GravatarBaseStyle.xaml 1.3 KB

1234567891011121314151617181920212223
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:hc="clr-namespace:HandyControl.Controls">
  4. <Style x:Key="GravatarBaseStyle" TargetType="hc:Gravatar">
  5. <Setter Property="Focusable" Value="False"/>
  6. <Setter Property="Width" Value="72"/>
  7. <Setter Property="Height" Value="72"/>
  8. <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
  9. <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
  10. <Setter Property="Padding" Value="6"/>
  11. <Setter Property="Template">
  12. <Setter.Value>
  13. <ControlTemplate TargetType="hc:Gravatar">
  14. <Border ClipToBounds="True" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
  15. <ContentPresenter Margin="{TemplateBinding Padding}"/>
  16. </Border>
  17. </ControlTemplate>
  18. </Setter.Value>
  19. </Setter>
  20. </Style>
  21. </ResourceDictionary>