tags:

views:

594

answers:

3

I do not know what I am doing wrong here. In the XAML below, the Border does not fill the available space on the tabItem (just lots of whitespace). How do I fill the entire tab page?

<TabControl>
    <TabItem Header="Plant State">
        <Border Background="Red" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Border>
    </TabItem>
</TabControl>
A: 

Nest a DockPanel in there, have you tried that?

Andrew

REA_ANDREW
Hi Andrew, I've tried adding a dockPanel and a Grid, but neither of them make a difference.
willem
+2  A: 

I figured this out with the help of Matt Hamilton. This actually works fine if you are using a regular TabControl (default Template).

I am using a xaml "theme" that alters the default control template. That is causing the layout to fail, so I will have to investigate and figure out what is wrong.

willem
Have you found how to solve this problem? I'm having the same issue...
Nelson Reis
+1  A: 

Can you post the answer when you find out what is wrong ? I am having the same issue when I use 'theme'