Files
HandyControl/Net40/HandyControl_Net40/Themes/Styles/Base/GravatarBaseStyle.xaml
T
2019-03-09 23:23:52 +08:00

22 lines
1.2 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:HandyControl.Controls">
<Style x:Key="GravatarBaseStyle" TargetType="controls:Gravatar">
<Setter Property="Width" Value="72"/>
<Setter Property="Height" Value="72"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="Padding" Value="6"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:Gravatar">
<Border ClipToBounds="True" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter Margin="{TemplateBinding Padding}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>