Class DataGridHelper
Represents a helper class that provides various extensions for the DataGrid control.
public static class DataGridHelper
- Inheritance
-
DataGridHelper
- Inherited Members
Fields
ScrollToNewestRowProperty
This property enables a DataGrid to automatically scroll to the row of a new item as it is added.
public static readonly DependencyProperty ScrollToNewestRowProperty
Field Value
Examples
<UserControl xmlns:u="http://lisrt.de/utility">
<DataGrid u:DataGridHelper.ScrollToNewestRow="True" ItemsSource="{Binding Items}"/>
</UserControl>
ThreeStateSortingProperty
This property enables a DataGrid for three state sorting. This means that when a user clicks on the column header, the items will be displayed in ascending order, then in descending order, and then unsorted.
public static readonly DependencyProperty ThreeStateSortingProperty
Field Value
Examples
<UserControl xmlns:u="http://lisrt.de/utility">
<DataGrid u:DataGridHelper.ThreeStateSorting="True" ItemsSource="{Binding Items}"/>
</UserControl>
Methods
GetScrollToNewestRow(DependencyObject)
Gets the value of the ScrollToNewestRowProperty for the element
.
public static bool GetScrollToNewestRow(DependencyObject element)
Parameters
element
DependencyObjectElement with the attached dependency property.
Returns
- bool
The current value of the auto scroll property.
GetThreeStateSorting(UIElement)
Gets the value of the ThreeStateSortingProperty for the element
.
[AttachedPropertyBrowsableForType(typeof(DataGrid))]
public static bool GetThreeStateSorting(UIElement element)
Parameters
element
UIElementElement with the dependency property.
Returns
- bool
The current value of the three ThreeStateSortingProperty.
SetScrollToNewestRow(DependencyObject, bool)
Sets the value of the ScrollToNewestRowProperty for the element
.
public static void SetScrollToNewestRow(DependencyObject element, bool value)
Parameters
element
DependencyObjectElement with the attached dependency property.
value
boolValue to set.
SetThreeStateSorting(UIElement, bool)
Sets the value of the ThreeStateSortingProperty for the element
.
[AttachedPropertyBrowsableForType(typeof(DataGrid))]
public static void SetThreeStateSorting(UIElement element, bool value)