-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
MaterialDesignTheme.ToolTip.xaml
23 lines (23 loc) · 1.51 KB
/
MaterialDesignTheme.ToolTip.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<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 TargetType="{x:Type ToolTip}" x:Key="MaterialDesignToolTip">
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignPaper}" />
<Setter Property="Background" Value="{DynamicResource MaterialDesignToolTipBackground}" />
<Setter Property="Padding" Value="8" />
<Setter Property="Placement" Value="Custom" />
<Setter Property="CustomPopupPlacementCallback" Value="{x:Static wpf:ToolTipAssist.CustomPopupPlacementCallback}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToolTip}">
<Border Background="{TemplateBinding Background}" CornerRadius="2" Margin="{TemplateBinding Margin}">
<ContentPresenter x:Name="ContentPresenter"
Margin="{TemplateBinding Padding}"
Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}">
</ContentPresenter>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>