09 2012 档案
摘要:首先我们需要安装Windows 8以及VS2012,下载地址:http://msdn.microsoft.com/zh-CN/windows/apps/br229516/ 然后我们打开VS2012,选择Windows Metro Style,然后选择创建Blank App项目如下图: 其新建完成的项目结构如下: 我们拖动一个按钮和ListBox到界面中,设置按钮事件以及ListBox的DataTemplate,如下Xaml代码: <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}"
阅读全文
摘要:
在Silverlight中的DataGrid我们经常会觉得表头太过于简单,对于某一些业务中我们可能需要展现多层次的表头。本文将结合DataGridTemplateColumn和Style解决这种问题。
一:引用命名空间 xmlns:dgCloumn="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data",不需要单独引用其他的DLL。这个命名空间是为了让我们声明的样式指定类型为DataGridColumnHeader。
阅读全文
