ToolTipBaseStyle.xaml 1.2 KB

12345678910111213141516171819202122
  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="ToolTipBaseStyle" TargetType="ToolTip">
  5. <Setter Property="Padding" Value="0,6"/>
  6. <Setter Property="Background" Value="White"/>
  7. <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
  8. <Setter Property="FontSize" Value="12"/>
  9. <Setter Property="hc:BorderElement.CornerRadius" Value="2"/>
  10. <Setter Property="Template">
  11. <Setter.Value>
  12. <ControlTemplate TargetType="ToolTip">
  13. <Border Effect="{StaticResource EffectShadow2}" Margin="8" Background="{DynamicResource RegionBrush}" Padding="{TemplateBinding Padding}" BorderThickness="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}">
  14. <ContentPresenter Margin="10,0"/>
  15. </Border>
  16. </ControlTemplate>
  17. </Setter.Value>
  18. </Setter>
  19. </Style>
  20. </ResourceDictionary>