Click or drag to resize

EnumExtension Class

XAML extension to return the values of an enumeration.
Inheritance Hierarchy
SystemObject
  System.Windows.MarkupMarkupExtension
    BionicCode.Utilities.Net.Core.Wpf.MarkupEnumExtension

Namespace:  BionicCode.Utilities.Net.Core.Wpf.Markup
Assembly:  BionicCode.Utilities.Net.Core.Wpf (in BionicCode.Utilities.Net.Core.Wpf.dll) Version: 1.0.2
Syntax
public class EnumExtension : MarkupExtension

The EnumExtension type exposes the following members.

Constructors
  NameDescription
Public methodEnumExtension
Default constructor.
Public methodEnumExtension(Type)
Constructor to initialize the EnumType property.
Top
Properties
  NameDescription
Public propertyEnumType
The enum to enumerate.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodProvideValue
When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.
(Overrides MarkupExtensionProvideValue(IServiceProvider).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
Examples
Provide the enum type via constructor or by setting the EnumType property:
<ComboBox ItemsSource="{Enum {x:Type MyEnum}}" />
<ComboBox ItemsSource="{Enum EnumType={x:Type MyEnum}}" />
See Also
https://github.com/BionicCode/BionicCode.Net/blob/master/README.md