I want to have 2 Textblocks in my TreeViewItem.Header
.
So I though it works like this:
<TreeViewItem>
<TreeViewItem.Header>
<DockPanel LastChildFill="False" HorizontalAlignment="Stretch">
<TextBlock Text="Pizza" DockPanel.Dock="Left"/>
<TextBlock Text="5,00 €" DockPanel.Dock="Right"/>
</DockPanel>
</TreeViewItem.Header>
</TreeViewItem>
But the DockPanel don't fill all the Space which is available in TreeViewItem.Header
. I tried to Use HorizontalAlignment="Stretch"
, but this hasn't any effect.
Is there an Attribute to make this Work?