So the problem is the following:
I have a Dictionary<FormatEnum,string> and I want to access this Dicitionary from XAML.
FormatEnum has the types Small, Medium and Big, and the string contains a URL to a picture.
I tried the following code:
<ItemsControl Name="MixControl">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border CornerRadius="5" BorderThickness="2" BorderBrush="Black" Width="56" Height="56">
<Border.Background>
<ImageBrush ImageSource="{Binding CoverUrls[{x:Static tracks:CoverFormat.Small}]}"/>
</Border.Background>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
tracks is the namespacereference, and I read somewhere to use x:Static... But it won't work ...
Thanks for your help!