Introduction to typical properties of ListView and DataGrid in WPF, wpflistview

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.