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

I am adding few controls dynamically to a stack panel control as children. I would like to wrap controls to next row if the controls don't fit in a row. How can I do that?

Thanks
Posted

I don't think the stack panel and your child controls are designed this way. You could design the window the way the container panel adjusts to the content or work with scroll bars, whatever suit you the best.

—SA
 
Share this answer
 
You could create a WrapPanel. For more info take a look at http://www.c-sharpcorner.com/uploadfile/mahesh/wrappanel-in-wpf/[^]

Uros
 
Share this answer
 
Comments
Vivek Pandey (V) 28-Feb-12 13:48pm    
Hi,

Actually WrapPanel is not available in Silverlight version for Windows Phone development.

Thanks
Vivek Pandey (V) 4-Mar-12 21:13pm    
Thanks for the hint. I did find the WrapPanel inside the Windows Phone development toolkit.

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