I know I can declare an array of string in XAML like this:
<x:Array Type="{x:Type System:String}">
<System:String> first </System:String>
<System:String> second </System:String>
<System:String> third </System:String>
</x:Array>
How can I declare an array of System.Collections.Specialized.StringDictionary in XAML
<x:Array Type="{x:Type Specialized:StringDictionary}">
<Specialized:StringDictionary>
(((what do I put here?)))
</Specialized:StringDictionary>
</x:Array>
Thanks!
No built in way to support it but two options to get you close.
If you are on .NET 4 and are NOT compiling your XAML (highly unlikely)
you can do something like this
https://web.archive.org/web/20120118193925/http://blogs.windowsclient.net/rob_relyea/archive/2009/06/01/xaml-using-generic-types-in-xaml-2009.aspx
Again, this is really not a viable solution for most but it is possible.
More than likely you will want to create a custom markup extension to support generic collection initialization. Something like this:
https://web.archive.org/web/20160219214423/http://blogs.msdn.com/b/mikehillberg/archive/2006/10/06/limitedgenericssupportinxaml.aspx
adapt his last solution to include key and value and it should get where you want, sort of