Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i need to expand the tabcontrol with main window,when it maximize.

help me to resize the tabcontrol with the main window. i tried something as follows...


XML
<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">

<Grid >      
        <TabControl Height="310" Name="tabControl1" Width="501" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
</TabControl>            
    </Grid>   
</Window>



.....................?
Posted
Comments
[no name] 13-Sep-12 9:30am    
If you want your tab control to resize with the window, why are you explicitly setting the width and height?
darshan_ur 13-Sep-12 10:03am    
Wes is correct, just remove the Width and height from both window and tabcontrol

1 solution

To allow your tab control to resize with the window, remove the explicit setting of the width and height for the tab control.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900