WPF-栈式面板
Orientation属性
Orientation属性决定SatckPanel中元素的排列方向,默认为垂直排列 Orientation=“Vertical”:
运行效果如下:
将Orientation设置为Orientation="Horizontal"效果如下图:
*如何设置布局中StackPancel的位置
1、使用HorizontalAlignment属性设置子元素在布局中的垂直位置:
运行效果如下:
2、使用HorizontalAlignment属性设置子元素在布局中的水平位置:
运行效果如下: