Does someone know why WPF Viewbox control doesn’t scale WPF WebBrowser control?
Is it possible to do at all?
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>
Because it inherits from :
System.Windows.Interop.HwndHost(that hosts a Win32 window)It is not a pure WPF object.
Then effect, scaling, etc, can’t apply on it.
WPF 4.5 Developer Preview supported scaling, rotation, skewing of HwndHost controls but they seem to have removed this feature in the final release.