WPF SDK研究 Intro(2) QuickStart2

QuickStart2
    This sample shows how to use a DockPanel element to arrange three Button in a vertical stack.
    区别于上一个Sample,这个例子在StackPanel里,居左对齐,垂直排列3个按钮。

<StackPanel 
  xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x
="http://schemas.microsoft.com/winfx/2006/xaml">
  
<Button HorizontalAlignment="Left"
          Width
="100"
          Margin
="10,10,10,10">Button 1</Button>         
  
<Button HorizontalAlignment="Left"
          Width
="100"
          Margin
="10,10,10,10">Button 2</Button>
  
<Button HorizontalAlignment="Left"
          Width
="100"
          Margin
="10,10,10,10">Button 3</Button>    
</StackPanel>
原文地址:https://www.cnblogs.com/Jax/p/1096734.html