My group header has a custom background, some text that need to align to the left, and some to the right. But now they are all crammed to the left of the header row. How can I make it stretch?
My header template:
My header template:
<
DataTemplate
x:Key
=
"alarmGridGroupTemplate"
>
<
Grid
Background
=
"{Binding Group.Key, Converter={StaticResource priorityToBrushConverter}}"
Height
=
"26"
VerticalAlignment
=
"Center"
>
<
Grid.Resources
>
<
Style
TargetType
=
"{x:Type TextBlock}"
>
<
Setter
Property
=
"FontSize"
Value
=
"14"
/>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
<
Setter
Property
=
"VerticalAlignment"
Value
=
"Center"
/>
</
Style
>
</
Grid.Resources
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"*"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
<
TextBlock
Text
=
"{Binding Path=Group.Key, Converter={StaticResource priorityToDescriptionConverter}}"
Margin
=
"3.5,0"
/>
<
TextBlock
Grid.Column
=
"1"
Text
=
"Count:"
/>
<
TextBlock
Grid.Column
=
"2"
Text
=
"{Binding Group.ItemCount}"
TextAlignment
=
"Right"
Margin
=
"5,0,11,0"
/>
</
Grid
>
</
DataTemplate
>