I am trying to stretch the wpf tab control content for fit the screen when it resizes even if the tab item is empty. There doesnt seem to be a stretch property?
I just tried the code below and the rectangle seemed to to stretch correctly. The TabControl also stretched correctly if I removed the Border & Rectangle from the TabItem. Maybe I'm not understanding what you mean by 'empty,' but give this a try.
<Grid>
<TabControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<TabItem Header="Item 1" Name="tabItem1">
<Border Margin="5" BorderBrush="Red" BorderThickness="3">
<Rectangle Fill="Pink" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
</Border>
</TabItem>
</TabControl>
</Grid>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With