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
nullto indicate no sorting, which will use the order the enumeration values are defined.
EnumType
Gets or sets 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:
trueif a null value entry is included in the list; otherwisefalse. The default value isfalse.
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:
trueif 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:
trueif enumeration values should be displayed using an associatedDisplayAttribute, if any; otherwisefalse. The default value isfalse.
Value
Gets or sets the value of the control.
Events
ValueChanged
Occurs after the Value property value changes.
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