1

How do I fill a dictionary with sampledata to use in design mode?

I added xmlns:k="clr-namespace:System.Collections.Generic;assembly=mscorlib" to be able to add key-value pairs but somehow it still doesnt work.

Can someone help me with this please?

Rndm
  • 6,710
  • 7
  • 39
  • 58
martinyyyy
  • 1,652
  • 3
  • 21
  • 44

1 Answers1

0

There is currently no proper support for generic class in XAML (in XAML 2009 there is x:TypeArguments, currently only usable in uncompiled XAML), a workaround is using custom markup extensions that create them via reflection. An example can be found in another answer of mine, you could adjust it for dictionaries so you can also add the key value pairs.

Community
  • 1
  • 1
H.B.
  • 166,899
  • 29
  • 327
  • 400