Files
cefsharp/CefSharp.Wpf/Themes/Generic.xaml
T
amaitland c021be6c8d WPF - ChromiumWebBrowser inherits from Control rather than UserControl
Based on #1499

Popup is created in xaml
Canvas used to absolute position the two images, one on top of the other
No Mouse.Capture required
2018-01-18 13:24:29 +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.Bottom="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>