DockPanel
- 특정 방향으로 도킹시킬때 사용되는 레이아웃 컨트롤입니다.
사용방법은 WrapPanel 컨트롤 추가 방법과 같습니다.
MainPage.xaml |
[그림 13-1] <Grid x:Name="LayoutRoot" Background="White"> <my:DockPanel LastChildFill="False"> <Button Content="#1"></Button> <Button Content="#2" my:DockPanel.Dock="Top"></Button> <Button Content="#3" my:DockPanel.Dock="Right"></Button> <Button Content="#4" my:DockPanel.Dock="Bottom"></Button> </my:DockPanel> </Grid> |
응용 예제입니다.
FrmDockPanel.xaml |
[그림 13-2] <Grid x:Name="LayoutRoot"> <my:DockPanel LastChildFill="False"> <Button my:DockPanel.Dock="Left" Background="AliceBlue" Content="#1"></Button> <Button my:DockPanel.Dock="Top" Background="AliceBlue" Content="#2"></Button> <Button my:DockPanel.Dock="Right" Background="AliceBlue" Content="#3"></Button> <Button my:DockPanel.Dock="Bottom" Background="AliceBlue" Content="#4"></Button> <Button my:DockPanel.Dock="Left" Background="AliceBlue" Content="#5"></Button> <Button my:DockPanel.Dock="Top" Background="AliceBlue" Content="#6"></Button> <Button my:DockPanel.Dock="Right" Background="AliceBlue" Content="#7"></Button> <Button my:DockPanel.Dock="Bottom" Background="AliceBlue" Content="#8"></Button> </my:DockPanel> </Grid> |
'Silverlight' 카테고리의 다른 글
15.SilverLight3 - Shape - Ellipse ( 타원 ) (0) | 2009.11.25 |
---|---|
14.SilverLight3 - Shape - Rectangle ( 사각형 ) (0) | 2009.11.25 |
12.SilverLight3 - Layout - WrapPanel (0) | 2009.11.25 |
11.SilverLight3 - Layout - Border (0) | 2009.11.24 |
10.SilverLight3 - Layout - Padding 과 Margin (0) | 2009.11.24 |
Comments