WEB开发网
开发学院图形图像Flash Using The Silverlight DataGrid 阅读

Using The Silverlight DataGrid

 2008-10-24 11:47:00 来源:WEB开发网   
核心提示:If you have ever worked on an application that displayed large amounts of data, one of the cornerstones of your application was probably a DataGrid control.We h

If you have ever worked on an application that displayed large amounts of data, one of the cornerstones of your application was probably a DataGrid control. We have provided four .NET DataGrids over the years, two for ASP.NET and two for Windows Forms, but until now Silverlight and WPF were left out of the party. 

At MIX 2008 we shipped the first preview of the Silverlight DataGrid and a preview of it in WPF was also shown. Now that it is out there people want to know how to use it. If you are one of those people, then you have come to the right place. Here's a quick guide on how to get up and running with a Silverlight DataGrid.

Step 0: Create A Silverlight Project

Start a new Silverlight Application as outlined in my previous post. When given the option, choose the default "Add a new ASP.NET Web project" option.

Step 1: Add a DataGrid

If everything went smoothly in the previous step, your project should be loaded and opened to Page.xaml. Now just find the DataGrid on the Toolbox and drag it into the root layout Grid named "LayoutRoot".

Using The Silverlight DataGrid

This does a few things behind the scenes:

It adds a reference in your Silverlight project to System.Windows.Controls.Data

It adds an xmlns called "data" to the root UserControl that specifies that the DataGrid is in the System.Windows.Controls namespace and located in the System.Windows.Controls.Data assembly

xmlns:data="clr-namespace:System.Windows.Controls;
assembly=System.Windows.Controls.Data"

1 2 3 4 5 6  下一页

Tags:Using The Silverlight

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接