In order to bind a 'friendly' enum I follow this link
Databinding an enum property to a ComboBox in WPF
but I have this error:Unable to create 'Type' from the 'Status' string
this is my code behind
public enum Status
{
[Description("Available.")]
Available,
[Description("Not here right now.")]
Away,
[Description("I don't have time right now.")]
Busy
}
public Status CurrentStatus { get; set; }
public MainWindow()
{
InitializeComponent();
}
and this is my XAML
<Grid>
<ComboBox
ItemsSource="{Binding Source={my:Enumeration {x:Type Status}}}"
DisplayMemberPath="Description"
SelectedValue="{Binding CurrentStatus}"
SelectedValuePath="Value" />
</Grid>
what's I wrong?
thanks