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 EnumPicker class.

public EnumPicker()

Properties

EnumSortComparer

Gets or sets 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

Gets or sets the enumeration type.

public Type EnumType { get; set; }

Property Value

Type:

The enumeration type.

IsNullAllowed

Gets or sets a value indicating 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

Gets or sets 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

Gets or sets the text to display for a null value item when IsNullAllowed is true.

public string NullValueText { get; set; }

Property Value

string:

The text to display for a null value item.

UseDisplayAttributes

Gets or sets 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.

Value

Gets or sets the value of the control.

public object Value { get; set; }

Property Value

object:

The value of the control.

Events

ValueChanged

Occurs after the Value property value changes.

public event EventHandler ValueChanged

Event Type

EventHandler

Fields

EnumSortComparerProperty

Identifies the EnumSortComparer dependency property. This field is read-only.

public static readonly DependencyProperty EnumSortComparerProperty

EnumTypeProperty

Identifies the EnumType dependency property. This field is read-only.

public static readonly DependencyProperty EnumTypeProperty

IsNullAllowedProperty

Identifies the IsNullAllowed dependency property. This field is read-only.

public static readonly DependencyProperty IsNullAllowedProperty

IsOnPopupProperty

Identifies the IsOnPopup dependency property. This field is read-only.

public static readonly DependencyProperty IsOnPopupProperty

NullValueTextProperty

Identifies the NullValueText dependency property. This field is read-only.

public static readonly DependencyProperty NullValueTextProperty

UseDisplayAttributesProperty

Identifies the UseDisplayAttributes dependency property. This field is read-only.

public static readonly DependencyProperty UseDisplayAttributesProperty

ValueProperty

Identifies the Value dependency property. This field is read-only.

public static readonly DependencyProperty ValueProperty

Inherited Members