StackPanel In xaml?
What the use of StackPanel In Xaml?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vishnujeet KumarPosted Oct 21, 2012, 11:32 AM
stack panel is useful xaml layout ,it's keep control horizontal and vertical . we Normally use when we need application as like bunch of control layout or list of control layout.
Stack child element horizontally or vertically
Default is vertical .
Use orientation properties to change to horizontal .
Control positioning of element by setting their horizontal Alignment or vertical Alignment Properties.
Control spacing by setting margin and padding properties of element .
Stretched to fill stack panel if Horizontal Alignment or Vertical Alignment is set to stretch.
Below simple Xaml code for stack Panel
FontWeight="Bold">List of fruits
StackPanel Orientation Properties Simple Xaml
siri sriPosted Oct 10, 2012, 6:33 PM
Santhosh Kumar JayaramanPosted Oct 8, 2012, 1:20 AM
You can ask instead of stack panel, we can use dock panel.
But the difference is the order that you place child elements can affect the size of child elements in a DockPanel but not in a StackPanel. So you will get scollbar in stackpanel, but in Dockpanel, it will try to limit the area occupied by child control.