开发者

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 :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜