Skip to content

Commit c506371

Browse files
authored
Chip: Added TemplateBinding Padding (#3850)
1 parent 5f75c3b commit c506371

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Chip.xaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
<Setter Property="IconBackground" Value="{DynamicResource MaterialDesign.Brush.Primary}" />
8282
<Setter Property="IconForeground" Value="{DynamicResource MaterialDesign.Brush.Primary.Foreground}" />
8383
<Setter Property="Margin" Value="4" />
84+
<Setter Property="Padding" Value="8,0,12,0" />
8485
<Setter Property="Template">
8586
<Setter.Value>
8687
<ControlTemplate TargetType="{x:Type wpf:Chip}">
@@ -123,7 +124,7 @@
123124
</ContentControl>
124125
<ContentControl x:Name="TextBlock"
125126
Grid.Column="1"
126-
Margin="8,0,12,0"
127+
Margin="{TemplateBinding Padding}"
127128
VerticalAlignment="Center"
128129
Content="{TemplateBinding Content}"
129130
ContentStringFormat="{TemplateBinding ContentStringFormat}"
@@ -175,6 +176,7 @@
175176
<Setter Property="BorderBrush" Value="{DynamicResource MaterialDesign.Brush.Chip.OutlineBorder}" />
176177
<Setter Property="BorderThickness" Value="1" />
177178
<Setter Property="Foreground" Value="{DynamicResource MaterialDesign.Brush.Foreground}" />
179+
<Setter Property="Padding" Value="8,0,12,0" />
178180
<Setter Property="Template">
179181
<Setter.Value>
180182
<ControlTemplate TargetType="{x:Type wpf:Chip}">
@@ -248,7 +250,7 @@
248250
</ContentControl>
249251
<ContentControl x:Name="TextBlock"
250252
Grid.Column="1"
251-
Margin="8,0,12,0"
253+
Margin="{TemplateBinding Padding}"
252254
VerticalAlignment="Center"
253255
Content="{TemplateBinding Content}"
254256
ContentStringFormat="{TemplateBinding ContentStringFormat}"

0 commit comments

Comments
 (0)