Open rjmurillo opened 5 years ago
When adding the WebViewCompatible to a WPF surface, the web page is rendered but not to the dimensions requested.
When layout is set to Auto (default) for the control, the control should stretch into the available area. The behavior is as expected at runtime.
WebViewCompatible_WPF_Designer_Size.zip
MainWindow.xaml
<Window xmlns:Controls="clr-namespace:Microsoft.Toolkit.Wpf.UI.Controls;assembly=Microsoft.Toolkit.Wpf.UI.Controls.WebView" x:Class="WebViewCompatible.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WebViewCompatible" mc:Ignorable="d" Title="WebViewCompatible Browser" Height="450" Width="800"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="20"></RowDefinition> <RowDefinition></RowDefinition> </Grid.RowDefinitions> <StackPanel> <Grid> <Button HorizontalAlignment="Left" Click="OnBackClicked">Back</Button> <Label x:Name="LoadingLabel" HorizontalAlignment="Center" Visibility="Collapsed">Loading...</Label> <Button HorizontalAlignment="Right" Click="OnForwardClicked">Forward</Button> </Grid> </StackPanel> <Controls:WebViewCompatible Grid.Row="1" x:Name="Browser" Source="https://www.bing.com" NavigationStarting="BrowserNavigating" NavigationCompleted="BrowserNavigated" MinHeight="92" MinWidth="375" /> </Grid> </Window>
Nuget Package(s): Microsoft.Toolkit.Wpf.UI.Controls.WebView Package Version(s): 4.1.0-build.83 Windows 10 Build Number: - [ ] Creators Update (15063) - [ ] Fall Creators Update (16299) - [ ] April 2018 Update (17134) - [x] Insider Build (build number: 18244) App min and target version: - [ ] Creators Update (15063) - [ ] Fall Creators Update (16299) - [ ] April 2018 Update (17134) - [ ] Insider Build (xxxxx) Device form factor: - [x] Desktop - [ ] Mobile - [ ] Xbox - [ ] Surface Hub - [ ] IoT Visual Studio - [x] 2017 (version: 15.8.4) - [ ] 2017 Preview (version: )
@joshholmes FYI
I'm submitting a...
Current behavior
When adding the WebViewCompatible to a WPF surface, the web page is rendered but not to the dimensions requested.
Expected behavior
When layout is set to Auto (default) for the control, the control should stretch into the available area. The behavior is as expected at runtime.
Minimal reproduction of the problem with instructions
WebViewCompatible_WPF_Designer_Size.zip
MainWindow.xaml
Environment