I want to create an array resource of colors in XAML where each color is defined as a dynamic resource. I think that it can be done, but I can't figure out the syntax.
I have tried this:
<x:Array Type="Color" x:Key="Colors">
<Color>
<DynamicResource ResourceKey="BasicBlueColor" />
</Color>
</x:Array>
But it doesn't work, because dynamic resource can only be assigned to dependency property.
And this just simply doesn't work, but I think it describes well what I am trying to do:
<x:Array Type="Color" x:Key="Colors">
<Color>{DynamicResource BasicRedColor}</Color>
</x:Array>
Clarification:
I can't use static resources over dynamic because the colors are defined in referenced assembly which is out of my control.- The resource I am trying to create must be of type IList.
Edit 2: I was under impression that the resources are defined as static or dynamic and that they must be used as defined. My thanks to @Sham for explaining it to me.