One of the main advantages to using a WPF control is that controls are "lookless" with a fully customizable user interface. Just as you design your own user interface (UI), or look and feel, for WPF applications, you can provide your own UI for data managed by DataGrid for WPF. Extensible Application Markup Language (XAML; pronounced "Zammel"), an XML-based declarative language, offers a simple approach to designing your UI without having to write code. DataGrid for WPF includes several templates so that you don't have to begin creating your own UI from scratch.
Accessing Templates
You can access templates in Microsoft Expression Blend by selecting the C1DataGrid control and, in the DataGrid's menu, selecting Edit Other Templates. To create a copy of a template that you can edit, open the C1DataGrid menu, select Edit Other Templates, choose the template you wish to edit, and select either Edit a Copy, to create an editable copy of the current template, or Create Empty, to create a new blank template.
The C1DataGrid control provides several style properties that you can use to completely change the appearance of the control and its rows, columns, headers, and cells. Some of the included styles are described in the table below:
Style | Description |
---|---|
C1DataGrid.CellStyle | Gets or sets the style that is used when rendering the cells. |
C1DataGrid.ColumnHeaderStyle | Gets or sets the style that is used when rendering the column headers. |
C1DataGrid.DragOverColumnStyle | Style applied to a ContentControl element used to show the dragged column while it is moved. |
C1DataGrid.DrageSourceColumnStyle | Style applied to a ContentControl that is placed over the source column when it starts the drag-and-drop operation. |
C1DataGrid.DropIndicatorStyle | Style applied to a ContentControl element used to indicate the position where the dragged column will be dropped. |
C1DataGrid.FilterStyle | Gets or sets the style used for the filter control container. |
C1DataGrid.FocusStyle | Sets the style of the internal Rectangle used to show the focus on the C1DataGrid. |
C1DataGrid.GroupColumnHeaderStyle | Gets or sets the style that is used when rendering the column headers in the group panel. |
C1DataGrid.GroupRowHeaderStyle | Gets of sets the style of the header of the group row. |
C1DataGrid.GroupRowStyle | Gets of sets the style of the group row. |
C1DataGrid.NewRowHeaderStyle | Gets or sets the style that is used when rendering the row header for entering new items. |
C1DataGrid.NewRowStyle | Gets or sets the style that is used when rendering the row for entering new items. |
C1DataGrid.RowHeaderStyle | Gets or sets the style that is used when rendering the row headers. |
C1DataGrid.RowStyle | Gets or sets the style that is used when rendering the rows. |