I got a Stackpanel containing many buttons, so how can I reorder my buttons by draging & droping them like Expression Blend or "Visual Studio Xaml Window Designer" does
This is because StackPanel measures in the direction of stacking at PositiveInfinity, whereas DockPanel measures only the available size. The following example demonstrates this key difference. The difference in rendering behavior can be seen in this image.
StackPanel is a layout panel that arranges child elements into a single line that can be oriented horizontally or vertically. By default, StackPanel stacks items vertically from top to bottom in the order they are declared. You can set the Orientation property to Horizontal to stack items from left to right.
A StackPanel allows you to stack elements in a specified direction. By using properties that are defined on StackPanel, content can flow both vertically, which is the default setting, or horizontally.
This thread provides some useful information. Nevertheless, there are a lot of resources that you can find in by searching which would provide a lot of information on this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With