Skip to content

Commit 9b247a6

Browse files
author
Carl Chang
committed
custom tooltip style
1 parent 186ada3 commit 9b247a6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

UserControls/Generic.xaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,4 +267,21 @@
267267
</Setter>
268268
</Style>
269269

270+
<!--tooltip style-->
271+
<Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
272+
<Setter Property="TextBlock.TextAlignment" Value="Left"/>
273+
<Setter Property="TextBlock.FontSize" Value="12" />
274+
<Setter Property="Background" Value="{StaticResource BackgroundBrush}" />
275+
<Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
276+
<Setter Property="Template">
277+
<Setter.Value>
278+
<ControlTemplate TargetType="ToolTip">
279+
<Border Background="{TemplateBinding Background}" CornerRadius="4" UseLayoutRounding="True"
280+
Margin="10" Effect="{StaticResource DS_Below}">
281+
<ContentPresenter Margin="4" HorizontalAlignment="Left" VerticalAlignment="Top" />
282+
</Border>
283+
</ControlTemplate>
284+
</Setter.Value>
285+
</Setter>
286+
</Style>
270287
</ResourceDictionary>

0 commit comments

Comments
 (0)