In This Article

DataGridEnumColumn Class

Represents a data-bound column for use in a DataGrid that utilizes the EnumEditBox control.

public class DataGridEnumColumn : DataGridPartEditBoxColumnBase<object>
Inheritance:
object DataGridColumn DataGridBoundColumn DataGridBoundColumnBase DataGridPartEditBoxColumnBase<object> object

Constructors

DataGridEnumColumn()

Initializes an instance of the class.

public DataGridEnumColumn()

Properties

EnumSortComparer

The IComparer<T> used to sort the enumeration values.

public IComparer<Enum>? EnumSortComparer { get; set; }

Property Value

IComparer<Enum>:

The IComparer<T> used to sort the enumeration values; otherwise null to indicate no sorting, which will use the order the enumeration values are defined.

EnumType

The enumeration type.

public Type? EnumType { get; set; }

Property Value

Type

IsArrowKeyPartNavigationEnabled

Indicates whether the left/right arrow keys can be used to move between and select editable parts.

public bool IsArrowKeyPartNavigationEnabled { get; set; }

Property Value

bool:

true if the left/right arrow keys can be used to move between and select editable parts; otherwise false. The default value is false.

IsEditable

Indicates whether the edit box's text area is editable.

public bool IsEditable { get; set; }

Property Value

bool:

true if the edit box's text area is editable; otherwise false. The default value is false.

Remarks

When false, the edit box behaves more like a ComboBox.

SpinWrapping

The wrapping behavior used when spinning past a minimum or maximum value in the active part.

public SpinWrapping SpinWrapping { get; set; }

Property Value

SpinWrapping:

The default value is SimpleWrap.

UseDisplayAttributes

A value indicating whether enumeration values should be displayed using an associated DisplayAttribute, if any.

public bool UseDisplayAttributes { get; set; }

Property Value

bool:

true if enumeration values should be displayed using an associated DisplayAttribute, if any; otherwise false. The default value is false.

Methods

ApplyStandardValues(FrameworkElement)

Applies standard values to the specified target element.

protected override void ApplyStandardValues(FrameworkElement targetElement)
Parameter Type Description
targetElement FrameworkElement

The target element.

GetEditBoxType()

The type of the associated PartEditBoxBase-derived control.

protected override Type GetEditBoxType()

Returns

Type

Fields

EnumSortComparerProperty

Defines the EnumSortComparer property.

public static readonly DependencyProperty EnumSortComparerProperty

EnumTypeProperty

Defines the EnumType property.

public static readonly DependencyProperty EnumTypeProperty

UseDisplayAttributesProperty

Defines the UseDisplayAttributes property.

public static readonly DependencyProperty UseDisplayAttributesProperty

Inherited Members

Extension Methods