How to set d:DesignInstance to a generic type?

Viewed 3394

An easy one ;-)

I declared:

     xmlns:om="clr-namespace:System.Collections.ObjectModel;assembly=System"

I try to set a generic as the DataType:

 <DataGrid d:DataContext="{
     d:DesignInstance Type=om:ObservableCollection&lt;System:Int32&gt;}" />

But I'm receiving an error: "Invalid format for a type".

Anybody have an idea how I can do that ?

2 Answers

You could try this:

<DataGrid d:DataContext="{d:DesignInstance Type={x:Type om:ObservableCollection`1}}" />
Related