Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reorder StackPanel Children Drag & Drop

Tags:

c#

wpf

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

enter image description here

like image 491
S3ddi9 Avatar asked Sep 28 '12 18:09

S3ddi9


People also ask

What is the difference between StackPanel and DockPanel?

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.

What is a StackPanel?

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.

What is StackPanel WPF?

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.


1 Answers

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.

like image 200
Damian Schenkelman Avatar answered Oct 12 '22 23:10

Damian Schenkelman