문제

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