Click here to Skip to main content
15,916,412 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

How to strech Group Box width in WPF.

I would like to set width as in window/usercontrol width.

I cant use * or something in GroupBox control to set width.

Please help me with setting a width of window size.

Thanks in Advance.
Posted
Updated 12-Jun-11 18:47pm
v2

Try using a DockPanel and the place the GroupBox inside it.
<dockpanel horizontalalignment="Stretch">
       VerticalAlignment="Stretch">
     <groupbox>
       DockPanel.Dock="Top" />
</groupbox></dockpanel>
 
Share this answer
 
v3
Comments
Sanjay J Patolia 13-Jun-11 0:54am    
Hey, Thanks!!! It is working with minor changes. Thanks :) +5
Abhinav S 13-Jun-11 0:55am    
You are welcome.
Sergey Alexandrovich Kryukov 13-Jun-11 1:18am    
This is one of the ways, my 5.
Basically, almost nothing should have explicit size, and no container controls should.
--SA
Abhinav S 13-Jun-11 1:22am    
Thank you.
Hope this[^] might help you.
 
Share this answer
 

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