簡體   English   中英

WPF Viewbox和WebBrowser控件

[英]WPF Viewbox and WebBrowser controls

有人知道為什么WPF Viewbox控件不能擴展WPF WebBrowser控件嗎?

有可能嗎?

XAML:

<Window x:Class="WpfApplication12.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" Background="Yellow">
<Viewbox Stretch="Fill"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
<WebBrowser VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Source="http://stackoverflow.com"></WebBrowser>
</Viewbox>
</Window>

因為它繼承自: System.Windows.Interop.HwndHost (托管Win32窗口)

它不是純WPF對象。

然后效果,縮放等不能適用於它。

WPF 4.5 Developer Preview支持HwndHost控件的縮放,旋轉和偏移,但它們似乎已在最終版本中刪除了此功能。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM