Skip to content

Commit 4b3b8dd

Browse files
committed
Add InfoBadge Style StringInfoBadgeStyle
1 parent 7b9f69f commit 4b3b8dd

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
4+
<Style x:Key="StringInfoBadgeStyle"
5+
TargetType="InfoBadge">
6+
<Setter Property="Padding" Value="5,1,5,2" />
7+
<Setter Property="Tag" Value="NEW" />
8+
<Setter Property="Template">
9+
<Setter.Value>
10+
<ControlTemplate TargetType="InfoBadge">
11+
<Border x:Name="RootGrid"
12+
Padding="{TemplateBinding Padding}"
13+
Background="{TemplateBinding Background}"
14+
CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.InfoBadgeCornerRadius}">
15+
<TextBlock HorizontalAlignment="Center"
16+
VerticalAlignment="Center"
17+
FontSize="10"
18+
Text="{TemplateBinding Tag}" />
19+
</Border>
20+
</ControlTemplate>
21+
</Setter.Value>
22+
</Setter>
23+
</Style>
24+
</ResourceDictionary>

0 commit comments

Comments
 (0)