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<System:Int32>}" />
But I'm receiving an error: "Invalid format for a type".
Anybody have an idea how I can do that ?
Generics are not supported yet. We can derive a class from any generics and use that class instead.
Oops, please see comment below from "Jan 'splite'K". It sounds that there is a markup extension that could do the job.
Also, look at uli78 link
Update 2021-09-30 , I think a great answer is given here: How do I set WPF xaml form's Design DataContext to class that uses generic type parameters (thanks to Revious for its comment)