I\'d like to be able to say
<
You could also go the other way around and convert the enum to int for the Value using a custom Markup Extension.
Example
EnumToIntExtension
public class EnumToIntExtension : MarkupExtension
{
public object EnumValue
{
get;
set;
}
public EnumToIntExtension(object enumValue)
{
this.EnumValue = enumValue;
}
public override object ProvideValue(IServiceProvider provider)
{
if (EnumValue != null && EnumValue is Enum)
{
return System.Convert.ToInt32(EnumValue);
}
return -1;
}
}