windowsmetro应用开发之c布局控件grid,canvas,stackpanel(延续silverlight).docxVIP

  • 3
  • 0
  • 约5.87千字
  • 约 4页
  • 2020-12-07 发布于天津
  • 举报

windowsmetro应用开发之c布局控件grid,canvas,stackpanel(延续silverlight).docx

Windows8 Metro 应用开发之 C#2 )-布局控件 Grid,Canvas,StackPanel 延续 Silverlight ) 介绍: 在Metro中从Silverlight中保留下来了一些布局控件及一些新增的布局控件。 本节主要讲解从 Silverlight 中延续下来的布局控件 Grid、Canvas及StackPanel,如果你有Silvelright 或WPF基 础可以跳过本节。b5E2RGbCAP Grid网格布局控件 定义由行和列组成的网格区域。 Grid.xaml vUserControl x:Class =BlankApplication.Grid 3 xmlns = /winfx/2006/ xaml/presentation 4 xmlns:x = /winfx/2006/xaml 5 xmlns: local =using:BlankApplication 6 xmlns:d = /expression/blend/ 2008 7 xmlns:mc = /markup-compatibility/2006 8 mc: Ignorable =d 9 d:DesignHeight =300 10 d:DesignWidth =400 11 32*/ 22vRowDefinitionHeight =43*/23/ Grid.RowDefinitions2 Grid.ColumnDefinitions25!-- 32*/ 22 vRowDefinition Height =43*/ 23 / Grid.RowDefinitions 2 Grid.ColumnDefinitions 25 !--定义四列及每列宽度-- 2 vColumnDefinition Width =58* / 27 vColumnDefinition Width 12 v!--Grid 表格布局 13 Grid.RowDefinitions :定义Grid中的行 14 Grid.ColumnDefinitions :定义Grid的列 15 16 -- 17 vGrid Horiz on talAlig nment =Ce nter Height =210 VerticalAlignment =Ce n ter Width =305 18 vGrid.RowDefinitions 19 !--定义三行及每行高度- - 20 vRowDefinition vRowDefinition Height Height =30*/ 21 ion Width =63*/ 30 v/ Grid.ColumnDefinitions 31 v!--Grid 第一列-- 3 2 v Rectangle Fill =#FFF4F4F5/ 33 vRectangle Fill =#FF0B0BEE Grid.R ow=1 / 34 vRectangle Fill =#FFEECF0B Grid.Row =2 / 35 v!--Gri d 第二列-- 36 v Rectangle Fill =#FF34EE0B Grid.Row =2 Grid.Column =1 / 3 7 v Rectangle Fill =#FFFF9A09 Grid.Row =0 Grid.Colum n =1 / 38 vRi ctangle Fill =#FF08B7D3 Grid.Row =1 Grid.Colum n =1 / 39 v!--Grid 第三列 -- 4 0 v Rectangle Fill =#FFD30889 Grid.Row =0 Grid.Colum n =2 / 41 vRi ctangle Fill =#FFB708D3 Grid.Row =1 Grid.Colum n =2 / 42 vRectangle Fill =#FF 4B484B Grid.Row =2 Grid.Column =2 / 43 v!--Grid 第四列-- 44 vRect angle Fill =#FF661F4D Grid.Row =0 Grid.Colum n =3 / 45 vRectangle Fill =#FF0D F0BC Grid.Row =1 Grid.Column =3 / 46 vRectangle Fill =#FF0FAA4E Grid.Row =2 Grid.Colum n =3 / 47 v/ Grid 48 49 v/ UserControl p1EanqFDPw vColumnDefinition vColumnDefinit =61*/ 28 Width =123*/ 29 Canvas 画布布局控件 定义一个区域,

文档评论(0)

1亿VIP精品文档

相关文档