Introduction to typical properties of ListView and DataGrid in WPF, wpflistview
ListView
GridView View
Important attributes:
Public bool AllowsColumnReorder gets or sets a value that indicates whether the columns in System. Windows. Controls. GridView can be reordered by dragging and dropping.
Public Style ColumnHeaderContainerStyLe gets or sets the style applied to the column title.
Public ContextMenu ColumnHeaderContextMenu
Public DataTemplate ColumnHeaderTemplate gets or sets the template used to display the column title.
Public DataTemplateSelector ColumnHeaderTemplateSeleThe ctor obtains or sets a logical selector object for the template used to select the title of each column.
Public GridViewColumnCollectionColumns obtains the set of System. Windows. Controls. GridViewColumn objects defined for System. Windows. Controls. Controls. GridView.
GridViewColumn indicates a column that displays data.
Public DataTemplate CellTemplate gets or sets the template used to display the content of column cells.
Public BindingBase DisplayMemberBinding
The public object Header obtains or sets the title content of System. Windows. Controls. GridViewColumn.
Public Style HeaderContainerStyle gets or sets the Style for the title of System. Windows. Controls. GridViewColumn.
Public DataTemplate HeaderTemplate gets or sets the template used to display the column title content.
DataGrid
DataGrid Template
Public Style CellStyle gets or sets the Style applied to all cells in System. Windows. Controls. DataGrid.
Public Style ColumnHeaderStyle
Public DataTemplate RowDetailsTemplate gets or sets a template for displaying row details
Public Style RowHeaderStyle
Public DataTemplate RowHeaderTemplate
Public Style RowStyle
Public ControlTemplate RowValidationErrorTemplaTe
DataGridColumn Template
Public Style CellStyle
Public Style HeaderStyle
Public DataTemplate HeaderTemplate
Important attributes:
Public ObservableCollection <SPAN style = "COLOR: # 2b91af"> DataGridColumn> Columns
Public DataGridRowDetailsVisibiLityMode RowDetailsVisibilityModeGets or sets a value that indicates the visibility of the row details.
Public DataGridCellInfo CurrentCell gets or sets cells with focus.
Public DataGridColumn CurrentColumn gets or sets the column that contains the current cell.
Public object CurrentItem obtains the data items bound to the row containing the current cell.
Public static RoutedUICommand DeleteCommand indicates the command, which indicates the intention to delete the current row.
Public DataGridHeadersVisibilitY HeadersVisibility gets or sets the value used to specify the row and column title visibility.
Public IList <SPAN style = "COLOR: # 2b91af"> maid> SelectedCells
Public DataGridSelectionMode SelectionMode
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.