Can I use enum as a ConverterParameter?

I am currently using an integer as ConverterParameter and casting it in Enum to Converter . I find this very unreadable in XAML .

I wonder if there is a way to declare Enum in the resource section and pass its value as ConverterParameter ?

+7
source share
1 answer

The easiest way is to use x:Static .

 {Binding ..., ConverterParameter={x:Static YourEnum.YourEnumValue}} 
+8
source

All Articles