mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 08:58:48 +00:00
87bfa94862
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
31 lines
1.4 KiB
XML
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>
|