質問

I have to design something like that:

enter image description here

Should I use a Grid (2 rows, 2 columns), or should I use a horizontal StackPanel with button 1 and another vertical StackPanel with buttons 2 and 3.

And especially - WHY should I use each option.

役に立ちましたか?

解決

You should consider your layout panel based on the following contexts:

Moving, Alignment, Resizing, and Docking.

If you use a WrapPanel for example, you will notice that when resizing the window, the button's will maintain their original size and stack on top of each other to fit to the window size, while in a Grid they will change their size to maintain their current location.

I suggest you to test your options by the mentioned ciritia's and choose what best fits your requierments.

他のヒント

if your Items in Grid has same size, you can use

<UniformGrid></UniformGrid>
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top