Generics in XAML
is it possible to write something like this in XAML:
<DataTemplate DataType="{x:Type vm:EntityListViewModel<T>}">
BUT
I need to specify generics because the declaration is开发者_高级运维 EntityListViewModel<T>
.
May be use DataTemplateSelector.
There are some support for generics in xaml 2009 http://blogs.windowsclient.net/rob_relyea/archive/2009/06/01/xaml-using-generic-types-in-xaml-2009.aspx
But im not sure if that works with datatemplate.
You could however experiment with setting the DataType property from code... i havet tried that though :)
精彩评论