![]() ![]() Gets or sets the sort direction (ascending or descending) of the column. Gets or sets the minimum width constraint of the column. Gets or sets the maximum width constraint of the column. Gets or sets a value that indicates whether the hosted CheckBox controls enable three states or two. Gets a value that indicates whether this instance is currently sealed (read-only). Gets or sets a value that indicates whether cells in the column can be edited. Gets a value that indicates whether the column is prevented from scrolling horizontally. Gets a value that indicates whether the column is auto-generated. Gets or sets the object that selects which template to use for the column header. Gets or sets the template that defines the visual representation of the column header. Gets or sets the style that is used when rendering the column header. Gets or sets the format pattern to apply to the content of the column header. Gets or sets the content of the column header. Gets or sets the style that is used when rendering the element that the column displays for a cell that is not in editing mode. Gets or sets the style that is used when rendering the element that the column displays for a cell in editing mode. Gets or sets the style object to apply to the column header during a drag operation. Gets or sets the display position of the column relative to the other columns in the DataGrid. Gets the Dispatcher this DispatcherObject is associated with. Gets the DependencyObjectType that wraps the CLR type of this instance. Gets the default value of the ElementStyle property. Gets the default value of the EditingElementStyle property. Gets the DataGrid control that contains this column. Gets or sets the binding object to use when getting or setting cell content for the clipboard. Gets or sets the style that is used to render cells in the column. Gets or sets a value that indicates whether the user can sort the column by clicking the column header. Gets or sets a value that indicates whether the user can adjust the column width by using the mouse. Gets or sets a value that indicates whether the user can change the column display position by dragging the column header. Gets or sets the binding that associates the column with a property in the data source. Gets the current width of the column, in device-independent units (1/96th inch per unit). ![]() ![]() Identifies the IsThreeState dependency property. Initializes a new instance of the DataGridCheckBoxColumn class. If you want to use other controls in your DataGrid, you can create your own column types by using DataGridTemplateColumn. If you want to display other types of data, DataGrid provides the following column types: Column Type You can customize the DataGridCheckBoxColumn by setting properties, such as Width, Header, IsThreeState, and IsReadOnly. ![]() For more information about data binding, see Data Binding (WPF). Optionally, you can specify a Binding.Converter if your data source and target are different types. Therefore, to set up the binding you only have to set the Binding.Path. The DataContext for the element in each cell is the data item for the row the cell is in. The Binding property is applied to the CheckBox element created in the column. To populate the column, bind the column to the data by using the Binding property. The following illustration shows an example of DataGridCheckBoxColumn. Use DataGridCheckBoxColumn to display columns of Boolean data as a CheckBox. This example uses a database as the source and displays a column of Boolean data. The following example shows how to add a DataGridCheckBoxColumn. DataGridBoundColumn DataGridCheckBoxColumn Examples ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |