Click or drag to resize

EnumToValuesConverter Class

Converts the specified enum-type into an array of the individual enum values. The converter parameter can be used to specify a comma separated exclude list.
Inheritance Hierarchy
SystemObject
  TomsToolbox.Wpf.ConvertersValueConverter
    TomsToolbox.Wpf.ConvertersEnumToValuesConverter

Namespace:  TomsToolbox.Wpf.Converters
Assembly:  TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 1.0.74.0
Syntax
[ValueConversionAttribute(typeof(Type), typeof(Array))]
public class EnumToValuesConverter : ValueConverter

The EnumToValuesConverter type exposes the following members.

Constructors
  NameDescription
Public methodEnumToValuesConverter
Initializes a new instance of the EnumToValuesConverter class
Top
Properties
  NameDescription
Public propertyConvertBackErrorValue
Gets or sets the error value, which is returned whenever the value to convert back produces an error; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertBackNullValue
Gets or sets the null value, which is returned whenever the value to convert back is null; the default is null.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertBackUnsetValue
Gets or sets the unset value, which is returned whenever the value to convert back is UnsetValue; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertErrorValue
Gets or sets the error value, which is returned whenever the value to convert produces an error; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertNullValue
Gets or sets the null value, which is returned whenever the value to convert is null; the default is null.

[CanBeNull]

(Inherited from ValueConverter.)
Public propertyConvertUnsetValue
Gets or sets the unset value, which is returned whenever the value to convert is UnsetValue; the default is UnsetValue.

[CanBeNull]

(Inherited from ValueConverter.)
Top
Methods
  NameDescription
Public methodStatic memberConvert(Type)
Converts the specified enum-type into an array of the individual enum values.

[NotNull, ItemNotNull]

Public methodStatic memberConvert(Type, String)
Converts the specified enum-type into an array of the individual enum values.

[NotNull, ItemNotNull]

Protected methodConvert(Object, Type, Object, CultureInfo)
Converts a value. Null and UnSet are unchanged.

[NotNull]

(Overrides ValueConverterConvert(Object, Type, Object, CultureInfo).)
Protected methodConvertBack
Converts a value.

[CanBeNull]

(Inherited from ValueConverter.)
Top
Fields
  NameDescription
Public fieldStatic memberDefault
The singleton instance of the converter.

[NotNull]

Top
Extension Methods
  NameDescription
Public Extension MethodSafeCastT
Performs a cast from object to T, avoiding possible null violations if T is a value type.

[CanBeNull]

(Defined by ObjectExtensions.)
Top
See Also