Files
cefsharp/CefSharp.Wpf/Themes/Generic.xaml
Chen Huang 87bfa94862 Use Canvas.Top="0" for PART_image absolute position. (#2844)
Using Canvas.Bottom will cause glitchiness when resizing the browser.
On a height change, the height of the canvas changes first, and since
a new frame has not yet been rendered, PART_image still has the old
height, causing the image to jump around
2019-07-25 11:53:31 +10:00

31 lines
1.4 KiB
XML

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CefSharp.Wpf">
<Style TargetType="{x:Type local:ChromiumWebBrowser}">
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:ChromiumWebBrowser}">
<Canvas>
<Image Name="PART_image"
Stretch="None"
Canvas.Left="0"
Canvas.Top="0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
RenderOptions.BitmapScalingMode="{TemplateBinding Property=RenderOptions.BitmapScalingMode}" />
<Image Name="PART_popupImage"
Stretch="None"
Visibility="Hidden"
HorizontalAlignment="Left"
VerticalAlignment="Top"
RenderOptions.BitmapScalingMode="{TemplateBinding Property=RenderOptions.BitmapScalingMode}" />
</Canvas>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>