Click or drag to resize
DataGrid Properties

The DataGrid type exposes the following members.

Properties
  NameDescription
Public propertyActualHeight
Gets the rendered height of a FrameworkElement. The FrameworkElement must be in the visual tree, otherwise this property will return double.NaN.
(Inherited from FrameworkElement.)
Public propertyActualWidth
Gets the rendered width of a FrameworkElement. The FrameworkElement must be in the visual tree, otherwise this property will return double.NaN.
(Inherited from FrameworkElement.)
Public propertyAutoGenerateColumns
Gets or sets a value that indicates whether the columns are created automatically.
Public propertyBackground
Gets or sets a brush that provides the background of the control.
(Inherited from Control.)
Public propertyBorderBrush
Gets or sets a brush that describes the border background of a control.
(Inherited from Control.)
Public propertyBorderThickness
Gets or sets the thickness of the border.
(Inherited from Control.)
Public propertyColumnHeaderStyle
Gets or sets the style applied to all column headers in the System.Windows.Controls.DataGrid.
Public propertyColumns
Gets a collection that contains all the columns in the System.Windows.Controls.DataGrid.
Public propertyCursor
Gets or sets the cursor that displays when the mouse pointer is over this element.
(Inherited from FrameworkElement.)
Public propertyDataContext
Gets or sets the data context for a FrameworkElement when it participates in data binding.
(Inherited from FrameworkElement.)
Public propertyDispatcher
Gets the CoreDispatcher that this object is associated with.
(Inherited from DependencyObject.)
Public propertyDisplayMemberPath
Gets or sets a path to a value on the source object to serve as the visual representation of the object.
(Inherited from Selector.)
Public propertyEffect (Inherited from UIElement.)
Public propertyFontFamily
Gets or sets the font used to display text in the control.
(Inherited from Control.)
Public propertyFontSize
Gets or sets the size of the text in this control.
(Inherited from Control.)
Public propertyFontWeight
Gets or sets the thickness of the specified font.
(Inherited from Control.)
Public propertyForeground
Gets or sets a brush that describes the foreground color.
(Inherited from Control.)
Public propertyHeight
Gets or sets the suggested height of a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyHorizontalAlignment
Gets or sets the horizontal alignment characteristics that are applied to a FrameworkElement when it is composed in a layout parent, such as a panel or items control.
(Inherited from FrameworkElement.)
Public propertyHorizontalContentAlignment
Gets or sets the horizontal alignment of the control's content.
(Inherited from Control.)
Public propertyIsEnabled
Gets or sets a value indicating whether the user can interact with the control.
(Inherited from FrameworkElement.)
Public propertyIsHitTestVisible
Gets or sets whether the contained area of this UIElement can return true values for hit testing.
(Inherited from FrameworkElement.)
Public propertyIsLoaded
Gets a value that indicates whether this element is in the Visual Tree, that is, if it has been loaded for presentation.
(Inherited from FrameworkElement.)
Public propertyIsReadOnly
Gets or sets a value that indicates whether the user can edit values in the System.Windows.Controls.DataGrid.
Public propertyItems
Gets the collection used to generate the content of the control. WARNING: When ItemsSource is set, it will only returns a snapshot. The returned values will not be updated at the same time as the ItemsSource.
(Inherited from ItemsControl.)
Public propertyItemsPanel
Gets or sets the template that defines the panel that controls the layout of items.
(Inherited from ItemsControl.)
Public propertyItemsSource
Gets or sets an object source used to generate the content of the ItemsControl.
(Inherited from ItemsControl.)
Public propertyItemTemplate
Gets or sets the DataTemplate used to display each item.
(Inherited from ItemsControl.)
Public propertyMargin
Gets or sets the outer margin of a FrameworkElement.
(Inherited from FrameworkElement.)
Public propertyName
Gets or sets the identifying name of the object. When a XAML processor creates the object tree from XAML markup, run-time code can refer to the XAML-declared object by this name.
(Inherited from FrameworkElement.)
Public propertyOpacity
Gets or sets the degree of the object's opacity. A value between 0 and 1.0 that declares the opacity factor, with 1.0 meaning full opacity and 0 meaning transparent. The default value is 1.0.
(Inherited from UIElement.)
Public propertyPadding
Gets or sets the distance between the border and its child object.
(Inherited from Control.)
Public propertyRenderTransform
Gets or sets transform information that affects the rendering position of a UIElement.
(Inherited from UIElement.)
Public propertyRenderTransformOrigin (Inherited from UIElement.)
Public propertyResources
Gets the locally defined resource dictionary. In XAML, you can establish resource items as child object elements of a frameworkElement.Resources property element, through XAML implicit collection syntax.
(Inherited from FrameworkElement.)
Public propertyRowHeaderTemplate
Gets or set the template for the row headers.
Public propertySelectedIndex
Gets or sets the index of the selected item.
(Inherited from Selector.)
Public propertySelectedItem
Gets or sets the selected item.
(Inherited from Selector.)
Public propertySelectedItemBackground
Defines the brush used for the background of a selected item.
Public propertySelectedItemForeground
Defines the brush used for the foreground of an item that is not selected.
Public propertySelectedItems
Gets the items in the System.Windows.Controls.Primitives.MultiSelector that are selected.
(Inherited from MultiSelector.)
Public propertySelectedValue
Gets or sets the value of the selected item, obtained by using the SelectedValuePath.
(Inherited from Selector.)
Public propertySelectedValuePath
Gets or sets the property path that is used to get the SelectedValue property of the SelectedItem property.
(Inherited from Selector.)
Public propertySelectionMode
Gets or sets a value that indicates how rows and cells are selected in the System.Windows.Controls.DataGrid.
Public propertyStyle
Gets or sets an instance Style that is applied for this object during rendering.
(Inherited from FrameworkElement.)
Public propertyTabIndex
Gets or sets a value that determines the order in which elements receive focus when the user navigates through controls by pressing the Tab key. The default value is MaxValue
(Inherited from Control.)
Public propertyTag
Gets or sets an arbitrary object value that can be used to store custom information about this object.
(Inherited from FrameworkElement.)
Public propertyTemplate
Gets or sets a control template.
(Inherited from Control.)
Public propertyUnselectedItemBackground
Defines the brush used for the background of an item that is not selected.
Public propertyUnselectedItemForeground
Defines the brush used for the foreground of a selected item.
Public propertyUseLayoutRounding
Gets or sets a value that determines whether rendering for the object and its visual subtree should use rounding behavior that aligns rendering to whole pixels.
(Inherited from UIElement.)
Public propertyVerticalAlignment
Gets or sets the vertical alignment characteristics that are applied to a FrameworkElement when it is composed in a parent object such as a panel or items control.
(Inherited from FrameworkElement.)
Public propertyVerticalContentAlignment
Gets or sets the vertical alignment of the control's content.
(Inherited from Control.)
Public propertyVisibility
Gets or sets the visibility of a UIElement. A UIElement that is not visible is not rendered and does not communicate its desired size to layout.
(Inherited from UIElement.)
Public propertyWidth
Gets or sets the width of a FrameworkElement.
(Inherited from FrameworkElement.)
Top
See Also