Themes/MaterialDesignTheme.ToolTip.xaml
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf"> <Style x:Key="MaterialDesignToolTip" TargetType="{x:Type ToolTip}"> <Setter Property="Background" Value="{DynamicResource MaterialDesign.Brush.ToolTip.Background}" /> <Setter Property="CustomPopupPlacementCallback" Value="{x:Static wpf:ToolTipAssist.CustomPopupPlacementCallback}" /> <Setter Property="Foreground" Value="{DynamicResource MaterialDesign.Brush.Background}" /> <Setter Property="Padding" Value="8" /> <Setter Property="Placement" Value="Custom" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ToolTip}"> <Border Margin="{TemplateBinding Margin}" Background="{TemplateBinding Background}" CornerRadius="2"> <ContentPresenter x:Name="ContentPresenter" Margin="{TemplateBinding Padding}" Content="{TemplateBinding ContentControl.Content}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" /> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary> |