Show / Hide Table of Contents

Class DataGrid

Data Grid UI control for displaying data in table

Inheritance
System.Object
DependencyObject
UIElement
Control
ItemsControl
Selector
DataGrid
Inherited Members
Selector.IsSelectedProperty
Selector.GetIsSelected(DependencyObject)
Selector.SetIsSelected(DependencyObject, Boolean)
Selector.SelectedIndexProperty
Selector.SelectedIndex
Selector.SelectedItemProperty
Selector.SelectedItem
Selector.SelectionChangedEvent
Selector.SelectionChanged
Selector.SelectedEvent
Selector.AddSelectedHandler(UIElement, RoutedEventHandler)
Selector.RemoveSelectedHandler(UIElement, RoutedEventHandler)
Selector.UnselectedEvent
Selector.AddUnselectedHandler(UIElement, RoutedEventHandler)
Selector.RemoveUnselectedHandler(UIElement, RoutedEventHandler)
Selector.OnSelectionChanged(SelectionChangedEventArgs)
Selector.UpdatePublicSelectionProperties()
Selector.BringTargetIntoView(UIElement, ScrollViewer)
ItemsControl.Items
ItemsControl.ItemsSourceProperty
ItemsControl.ItemsSource
ItemsControl.ItemsPanelProperty
ItemsControl.ItemsPanel
ItemsControl.ItemTemplateProperty
ItemsControl.ItemTemplate
ItemsControl.OnItemsSourceChanged(DependencyPropertyChangedEventArgs)
ItemsControl.OnPropertyChanged(DependencyProperty)
ItemsControl.OnContainersChanged()
Control.BackgroundProperty
Control.Background
Control.BorderBrushProperty
Control.BorderBrush
Control.BorderThicknessProperty
Control.BorderThickness
Control.ForegroundProperty
Control.Foreground
Control.FontProperty
Control.Font
Control.FontFamilyProperty
Control.FontFamily
Control.FontSizeProperty
Control.FontSize
Control.FontStyleProperty
Control.FontStyle
Control.PaddingProperty
Control.Padding
Control.TabIndexProperty
Control.TabIndex
Control.IsTabStopProperty
Control.IsTabStop
Control.TemplateProperty
Control.Template
Control.HorizontalContentAlignmentProperty
Control.HorizontalContentAlignment
Control.VerticalContentAlignmentProperty
Control.VerticalContentAlignment
Control.PreviewMouseDoubleClickEvent
Control.PreviewMouseDoubleClick
Control.OnPreviewMouseDoubleClick(MouseButtonEventArgs)
Control.MouseDoubleClickEvent
Control.MouseDoubleClick
Control.OnMouseDoubleClick(MouseButtonEventArgs)
Control.MeasureOverride(Size)
Control.OnDraw(Renderer, Double, Single)
Control.InvalidateIsEnabledOnChildren()
UIElement.visualOffset
UIElement.unclippedDesiredSize
UIElement.desiredSize
UIElement.needsClipBounds
UIElement.DesiredSize
UIElement.RenderSize
UIElement.DeviceRenderSize
UIElement.VisualOffset
UIElement.VisualPosition
UIElement.RenderPosition
UIElement.Parent
UIElement.ActualHeight
UIElement.ActualWidth
UIElement.IsLoaded
UIElement.TemplatedParent
UIElement.NameProperty
UIElement.Name
UIElement.HorizontalAlignmentProperty
UIElement.HorizontalAlignment
UIElement.VerticalAlignmentProperty
UIElement.VerticalAlignment
UIElement.VisibilityProperty
UIElement.Visibility
UIElement.MarginProperty
UIElement.Margin
UIElement.HeightProperty
UIElement.Height
UIElement.MaxHeightProperty
UIElement.MaxHeight
UIElement.MinHeightProperty
UIElement.MinHeight
UIElement.WidthProperty
UIElement.Width
UIElement.MaxWidthProperty
UIElement.MaxWidth
UIElement.MinWidthProperty
UIElement.MinWidth
UIElement.TagProperty
UIElement.Tag
UIElement.IsEnabledProperty
UIElement.IsEnabledCoerceValue
UIElement.IsEnabled
UIElement.IsMouseOverProperty
UIElement.IsMouseOver
UIElement.IsMouseCapturedProperty
UIElement.IsMouseCaptured
UIElement.IsTouchCapturedProperty
UIElement.IsTouchCaptured
UIElement.IsKeyboardFocusedProperty
UIElement.IsKeyboardFocused
UIElement.StyleProperty
UIElement.Style
UIElement.DataContextProperty
UIElement.DataContext
UIElement.IsFocusedProperty
UIElement.IsFocused
UIElement.FocusableProperty
UIElement.Focusable
UIElement.IsHitTestVisibleProperty
UIElement.IsHitTestVisible
UIElement.SnapsToDevicePixelsProperty
UIElement.SnapsToDevicePixels
UIElement.UseLayoutRoundingProperty
UIElement.UseLayoutRounding
UIElement.OpacityProperty
UIElement.Opacity
UIElement.IsMeasureValid
UIElement.IsArrangeValid
UIElement.Resources
UIElement.InputBindings
UIElement.ToolTipProperty
UIElement.ToolTip
UIElement.Triggers
UIElement.CursorTypeProperty
UIElement.CursorType
UIElement.EffectProperty
UIElement.Effect
UIElement.DataContextChanged
UIElement.IsEnabledChanged
UIElement.IsMouseCapturedChanged
UIElement.VisibleEvent
UIElement.Visible
UIElement.HiddenEvent
UIElement.Hidden
UIElement.CollapsedEvent
UIElement.Collapsed
UIElement.LoadedEvent
UIElement.Loaded
UIElement.UnloadedEvent
UIElement.Unloaded
UIElement.MouseDownEvent
UIElement.MouseDown
UIElement.PreviewMouseDownEvent
UIElement.PreviewMouseDown
UIElement.MouseUpEvent
UIElement.MouseUp
UIElement.PreviewMouseUpEvent
UIElement.PreviewMouseUp
UIElement.PreviewMouseWheelEvent
UIElement.PreviewMouseWheel
UIElement.MouseWheelEvent
UIElement.MouseWheel
UIElement.MouseMoveEvent
UIElement.MouseMove
UIElement.PreviewMouseMoveEvent
UIElement.PreviewMouseMove
UIElement.MouseEnterEvent
UIElement.MouseEnter
UIElement.MouseLeaveEvent
UIElement.MouseLeave
UIElement.PreviewKeyDownEvent
UIElement.PreviewKeyDown
UIElement.KeyDownEvent
UIElement.KeyDown
UIElement.PreviewKeyUpEvent
UIElement.PreviewKeyUp
UIElement.KeyUpEvent
UIElement.KeyUp
UIElement.GamepadDownEvent
UIElement.GamepadDown
UIElement.PreviewGamepadDownEvent
UIElement.PreviewGamepadDown
UIElement.GamepadUpEvent
UIElement.GamepadUp
UIElement.PreviewGamepadUpEvent
UIElement.PreviewGamepadUp
UIElement.PreviewGamepadMoveEvent
UIElement.PreviewGamepadMove
UIElement.GamepadMoveEvent
UIElement.GamepadMove
UIElement.PreviewGamepadTriggerEvent
UIElement.PreviewGamepadTrigger
UIElement.GamepadTriggerEvent
UIElement.GamepadTrigger
UIElement.PreviewTouchDownEvent
UIElement.PreviewTouchDown
UIElement.TouchDownEvent
UIElement.TouchDown
UIElement.PreviewTouchUpEvent
UIElement.PreviewTouchUp
UIElement.TouchUpEvent
UIElement.TouchUp
UIElement.PreviewTouchMoveEvent
UIElement.PreviewTouchMove
UIElement.TouchMoveEvent
UIElement.TouchMove
UIElement.PreviewTouchGestureEvent
UIElement.PreviewTouchGesture
UIElement.TouchGestureEvent
UIElement.TouchGesture
UIElement.GotFocusEvent
UIElement.GotFocus
UIElement.LostFocusEvent
UIElement.LostFocus
UIElement.SizeChangedEvent
UIElement.SizeChanged
UIElement.LayoutUpdated
UIElement.RequestBringIntoViewEvent
UIElement.RequestBringIntoView
UIElement.DpiScaleX
UIElement.DpiScaleY
UIElement.OnLostFocus(Object, RoutedEventArgs)
UIElement.OnGotFocus(Object, RoutedEventArgs)
UIElement.OnPreviewMouseUp(Object, MouseButtonEventArgs)
UIElement.OnPreviewMouseDown(Object, MouseButtonEventArgs)
UIElement.OnGamepadTrigger(Object, GamepadTriggerEventArgs)
UIElement.OnPreviewGamepadTrigger(Object, GamepadTriggerEventArgs)
UIElement.OnGamepadMove(Object, GamepadMoveEventArgs)
UIElement.OnGamepadUp(Object, GamepadButtonEventArgs)
UIElement.OnPreviewGamepadUp(Object, GamepadButtonEventArgs)
UIElement.OnGamepadDown(GamepadButtonEventArgs)
UIElement.OnPreviewGamepadDown(Object, GamepadButtonEventArgs)
UIElement.OnKeyUp(Object, KeyEventArgs)
UIElement.OnPreviewKeyUp(Object, KeyEventArgs)
UIElement.OnPreviewKeyDown(Object, KeyEventArgs)
UIElement.OnPreviewMouseMove(Object, MouseEventArgs)
UIElement.OnMouseMove(Object, MouseEventArgs)
UIElement.OnMouseWheel(MouseWheelEventArgs)
UIElement.OnMouseUp(Object, MouseButtonEventArgs)
UIElement.OnMouseDown(MouseButtonEventArgs)
UIElement.OnMouseLeave(MouseEventArgs)
UIElement.OnMouseEnter(MouseEventArgs)
UIElement.OnTouchUp(TouchEventArgs)
UIElement.OnPreviewTouchUp(TouchEventArgs)
UIElement.OnTouchDown(TouchEventArgs)
UIElement.OnPreviewTouchDown(TouchEventArgs)
UIElement.OnTouchMove(TouchEventArgs)
UIElement.OnPreviewTouchMove(TouchEventArgs)
UIElement.OnTouchGesture(TouchGestureEventArgs)
UIElement.OnPreviewTouchGesture(TouchGestureEventArgs)
UIElement.ApplyTemplate()
UIElement.OnIsEnabledChanged(DependencyPropertyChangedEventArgs)
UIElement.OnOpacityChanged(DependencyPropertyChangedEventArgs)
UIElement.Contains(PointF, Size)
UIElement.Draw(Renderer, Double, Single)
UIElement.Measure(Size)
UIElement.InvalidateMeasure()
UIElement.Arrange(Rect)
UIElement.InvalidateArrange()
UIElement.FindResource(Object)
UIElement.AddHandler(RoutedEvent, Delegate)
UIElement.RemoveHandler(RoutedEvent, Delegate)
UIElement.RaiseEvent(RoutedEventArgs)
UIElement.AddToEventRoute(EventRoute, RoutedEventArgs)
UIElement.CaptureMouse()
UIElement.ReleaseMouseCapture()
UIElement.OnIsMouseCapturedChanged(DependencyPropertyChangedEventArgs)
UIElement.CaptureTouch()
UIElement.ReleaseTouchCapture()
UIElement.Focus()
UIElement.BringIntoView()
DependencyObject.DependencyObjectType
DependencyObject.IsSealed
DependencyObject.Equals(Object)
DependencyObject.GetHashCode()
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.GetValue(DependencyProperty)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.GetLocalValueEnumerator()
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.SetBinding(DependencyProperty, Binding)
DependencyObject.SetResourceReference(DependencyProperty, Object)
Namespace: EmptyKeys.UserInterface.Controls
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class DataGrid : Selector

Constructors

DataGrid()

Initializes a new instance of the DataGrid class.

Declaration
public DataGrid()

Fields

AutoGenerateColumnsProperty

The automatic generate columns property

Declaration
public static readonly DependencyProperty AutoGenerateColumnsProperty
Field Value
Type Description
DependencyProperty

EnableRowVirtualizationProperty

The enable row virtualization property

Declaration
public static readonly DependencyProperty EnableRowVirtualizationProperty
Field Value
Type Description
DependencyProperty

SelectionModeProperty

The selection mode property

Declaration
public static readonly DependencyProperty SelectionModeProperty
Field Value
Type Description
DependencyProperty

SortingCommandProperty

The sorting command property

Declaration
public static readonly DependencyProperty SortingCommandProperty
Field Value
Type Description
DependencyProperty

VirtualizedCacheMaxRowsProperty

The virtualized cache maximum rows property

Declaration
public static readonly DependencyProperty VirtualizedCacheMaxRowsProperty
Field Value
Type Description
DependencyProperty

Properties

AutoGenerateColumns

Gets or sets a value indicating whether [automatic generate columns].

Declaration
public bool AutoGenerateColumns { get; set; }
Property Value
Type Description
System.Boolean

true if [automatic generate columns]; otherwise, false.

Columns

Gets the columns.

Declaration
public ObservableCollection<DataGridColumn> Columns { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<DataGridColumn>

The columns.

EnableRowVirtualization

Gets or sets a value indicating whether [enable row virtualization].

Declaration
public bool EnableRowVirtualization { get; set; }
Property Value
Type Description
System.Boolean

true if [enable row virtualization]; otherwise, false.

HorizontalScrollBarVisibility

Gets or sets the horizontal scroll bar visibility.

Declaration
public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
Property Value
Type Description
ScrollBarVisibility

The horizontal scroll bar visibility.

SelectionMode

Gets or sets the selection mode.

Declaration
public DataGridSelectionMode SelectionMode { get; set; }
Property Value
Type Description
DataGridSelectionMode

The selection mode.

VerticalScrollBarVisibility

Gets or sets the vertical scroll bar visibility.

Declaration
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
Property Value
Type Description
ScrollBarVisibility

The vertical scroll bar visibility.

Methods

ArrangeOverride(Size)

Arrange layout pass - overrider method for children

Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type Name Description
EmptyKeys.UserInterface.Size finalSize

The final size.

Returns
Type Description
EmptyKeys.UserInterface.Size
Overrides
Control.ArrangeOverride(Size)

GetContainerForItemOverride(Object)

Gets the container for item override.

Declaration
protected override UIElement GetContainerForItemOverride(object item)
Parameters
Type Name Description
System.Object item

The item.

Returns
Type Description
UIElement
Overrides
ItemsControl.GetContainerForItemOverride(Object)

GetSortingCommand(DependencyObject)

Gets the sorting command.

Declaration
public static ICommand GetSortingCommand(DependencyObject obj)
Parameters
Type Name Description
DependencyObject obj

The object.

Returns
Type Description
ICommand

GetVirtualizedCacheMaxRows(DependencyObject)

Gets the virtualized cache maximum rows.

Declaration
public static int GetVirtualizedCacheMaxRows(DependencyObject obj)
Parameters
Type Name Description
DependencyObject obj

The object.

Returns
Type Description
System.Int32

IsItemItsOwnContainerOverride(Object)

Determines whether if [is item its own container override].

Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
Type Name Description
System.Object item

The item.

Returns
Type Description
System.Boolean
Overrides
ItemsControl.IsItemItsOwnContainerOverride(Object)

OnApplyTemplate()

Called when [apply template].

Declaration
public override void OnApplyTemplate()
Overrides
ItemsControl.OnApplyTemplate()

OnItemInserted(Int32)

Called when [item inserted].

Declaration
protected override void OnItemInserted(int index)
Parameters
Type Name Description
System.Int32 index

The index.

Overrides
ItemsControl.OnItemInserted(Int32)

OnItemRemoved()

Called when [item removed].

Declaration
protected override void OnItemRemoved()
Overrides
ItemsControl.OnItemRemoved()

OnItemsCleared()

Called when [items cleared].

Declaration
protected override void OnItemsCleared()
Overrides
ItemsControl.OnItemsCleared()

OnKeyDown(KeyEventArgs)

Raises the KeyDown event.

Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type Name Description
KeyEventArgs e

The KeyEventArgs instance containing the event data.

Overrides
UIElement.OnKeyDown(KeyEventArgs)

OnPreviewGamepadMove(Object, GamepadMoveEventArgs)

Called when [preview game pad move].

Declaration
protected override void OnPreviewGamepadMove(object sender, GamepadMoveEventArgs e)
Parameters
Type Name Description
System.Object sender

The sender.

GamepadMoveEventArgs e

The GamepadMoveEventArgs instance containing the event data.

Overrides
UIElement.OnPreviewGamepadMove(Object, GamepadMoveEventArgs)

OnPreviewMouseWheel(Object, MouseWheelEventArgs)

Called when [preview mouse wheel].

Declaration
protected override void OnPreviewMouseWheel(object sender, MouseWheelEventArgs e)
Parameters
Type Name Description
System.Object sender

The sender.

MouseWheelEventArgs e

The MouseWheelEventArgs instance containing the event data.

Overrides
UIElement.OnPreviewMouseWheel(Object, MouseWheelEventArgs)

OnSelectedItemChanged(DependencyPropertyChangedEventArgs)

Raises the SelectedItemChanged event.

Declaration
protected override void OnSelectedItemChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type Name Description
DependencyPropertyChangedEventArgs e

The DependencyPropertyChangedEventArgs instance containing the event data.

Overrides
Selector.OnSelectedItemChanged(DependencyPropertyChangedEventArgs)

RaiseSortingEvent(DataGridSortingEventArgs)

Raises the sorting event.

Declaration
protected virtual void RaiseSortingEvent(DataGridSortingEventArgs args)
Parameters
Type Name Description
DataGridSortingEventArgs args

The DataGridSortingEventArgs instance containing the event data.

ScrollIntoView(Object)

Scrolls the into view.

Declaration
public void ScrollIntoView(object item)
Parameters
Type Name Description
System.Object item

The item.

SetContainer(UIElement, UIElement)

Sets the container.

Declaration
protected override void SetContainer(UIElement itemContainer, UIElement contentVisual)
Parameters
Type Name Description
UIElement itemContainer

The item container.

UIElement contentVisual

The content visual.

Overrides
ItemsControl.SetContainer(UIElement, UIElement)

SetSortingCommand(DependencyObject, ICommand)

Sets the sorting command.

Declaration
public static void SetSortingCommand(DependencyObject obj, ICommand value)
Parameters
Type Name Description
DependencyObject obj

The object.

ICommand value

The value.

SetVirtualizedCacheMaxRows(DependencyObject, Int32)

Sets the virtualized cache maximum rows.

Declaration
public static void SetVirtualizedCacheMaxRows(DependencyObject obj, int value)
Parameters
Type Name Description
DependencyObject obj

The object.

System.Int32 value

The value.

Events

Sorting

Occurs when [sorting].

Declaration
public event DataGridSortingEventHandler Sorting
Event Type
Type Description
DataGridSortingEventHandler
Back to top Generated by DocFX