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>
posted @ 2008-03-08 18:57  包建强  Views(447)  Comments(0Edit  收藏  举报