I have enum
public enum DocumentTypes
{
First, Second, Third, Fourth
}
How to pass values of enum
to <sys:Enum></sys:Enum>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1.Converters"
xmlns:enums="clr-namespace:WpfApplication1.Enums"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
<Label Content="Test2">
<Label.Visibility>
<MultiBinding Converter="{StaticResource Converter}">
<MultiBinding.ConverterParameter>
<x:Array Type="{x:Type sys:Enum}">
<sys:Enum></sys:Enum>
</x:Array>
</MultiBinding.ConverterParameter>
<Binding ElementName="First" Path="IsChecked" />
<Binding ElementName="Second" Path="IsChecked" />
<Binding ElementName="Third" Path="IsChecked" />
<Binding ElementName="Fourth" Path="IsChecked" />
</MultiBinding>
</Label.Visibility>
</Label>
Do this :
<x:Array Type="{x:Type sys:Enum}">
<local:DocumentTypes>First</local:DocumentTypes>
<local:DocumentTypes>Second</local:DocumentTypes>
<local:DocumentTypes>Third</local:DocumentTypes>
</x:Array>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With