46 lines
2.1 KiB
XML
46 lines
2.1 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="clr-namespace:WPFluent.Controls">
|
|
|
|
<Style x:Key="DefaultImageStyle" TargetType="{x:Type controls:Image}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type controls:Image}">
|
|
<Border
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
ClipToBounds="True"
|
|
CornerRadius="{TemplateBinding CornerRadius}">
|
|
|
|
<Image
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Source="{TemplateBinding Source}"
|
|
Stretch="{TemplateBinding Stretch}"
|
|
StretchDirection="{TemplateBinding StretchDirection}">
|
|
<Image.OpacityMask>
|
|
<VisualBrush>
|
|
<VisualBrush.Visual>
|
|
<Border
|
|
Width="{TemplateBinding ActualWidth}"
|
|
Height="{TemplateBinding ActualHeight}"
|
|
Background="White"
|
|
CornerRadius="{TemplateBinding InnerCornerRadius}" />
|
|
</VisualBrush.Visual>
|
|
</VisualBrush>
|
|
</Image.OpacityMask>
|
|
</Image>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultImageStyle}" TargetType="{x:Type controls:Image}" />
|
|
|
|
</ResourceDictionary>
|