PoptipBaseStyle.xaml 1.6 KB

12345678910111213141516171819202122232425
  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="PoptipBaseStyle" TargetType="hc:Poptip">
  5. <Setter Property="IsHitTestVisible" Value="False" />
  6. <Setter Property="HorizontalAlignment" Value="Left"/>
  7. <Setter Property="VerticalAlignment" Value="Top"/>
  8. <Setter Property="BorderThickness" Value="1"/>
  9. <Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
  10. <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
  11. <Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
  12. <Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/>
  13. <Setter Property="Template">
  14. <Setter.Value>
  15. <ControlTemplate TargetType="hc:Poptip">
  16. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
  17. <ContentPresenter Margin="{TemplateBinding Padding}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
  18. </Border>
  19. </ControlTemplate>
  20. </Setter.Value>
  21. </Setter>
  22. </Style>
  23. </ResourceDictionary>