In This Article

EnumPicker Class

Represents an Enum picker.

public class EnumPicker : PickerBase
Inheritance:
object Visual UIElement FrameworkElement Control PickerBase object

Constructors

EnumPicker()

Initializes an instance of the class.

public EnumPicker()

Properties

EnumSortComparer

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.

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

Property Value

IComparer<Enum>

EnumType

The enumeration type.

public Type? EnumType { get; set; }

Property Value

Type

IsNullAllowed

Indicates whether a null value entry is included in the list.

public bool IsNullAllowed { get; set; }

Property Value

bool:

true if a null value entry is included in the list; otherwise false. The default value is false.

IsOnPopup

Indicates whether the control is being used on a popup, which affects how value changes are handled.

public bool IsOnPopup { get; set; }

Property Value

bool:

true if the control is being used on a popup; otherwise, false.

NullValueText

The text to display for a null value item when IsNullAllowed is true.

public string NullValueText { get; set; }

Property Value

string

UseDisplayAttributes

Indicates 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.

Value

The value of the control.

public object? Value { get; set; }

Property Value

object

Events

ValueChanged

Occurs after the Value property value changes.

public event EventHandler? ValueChanged

Event Type

EventHandler

Fields

EnumSortComparerProperty

Defines the EnumSortComparer property.

public static readonly DependencyProperty EnumSortComparerProperty

EnumTypeProperty

Defines the EnumType property.

public static readonly DependencyProperty EnumTypeProperty

IsNullAllowedProperty

Defines the IsNullAllowed property.

public static readonly DependencyProperty IsNullAllowedProperty

IsOnPopupProperty

Defines the IsOnPopup property.

public static readonly DependencyProperty IsOnPopupProperty

NullValueTextProperty

Defines the NullValueText property.

public static readonly DependencyProperty NullValueTextProperty

UseDisplayAttributesProperty

Defines the UseDisplayAttributes property.

public static readonly DependencyProperty UseDisplayAttributesProperty

ValueProperty

Defines the Value property.

public static readonly DependencyProperty ValueProperty

Inherited Members

Extension Methods