开发者

How to add Type Parameters to XAML

开发者 https://www.devze.com 2022-12-18 23:22 出处:网络
I have the following class: public class DefaultDropTargetAdvisor : IDropTargetAdvisor { I 开发者_Go百科decided to make it have a generic parameter:

I have the following class:

public class DefaultDropTargetAdvisor : IDropTargetAdvisor 
{

I 开发者_Go百科decided to make it have a generic parameter:

public class DefaultDropTargetAdvisor<TDragType>
       : IDropTargetAdvisor where TDragType : class
{

This was my XAML before the change:

<local:DefaultDropTargetAdvisor x:Key="targetAdvisor1"/>

How do I change that XAML to now reflect the type parameter? (I want to pass in a class called MockWI).

Clearly this does not work:

<local:DefaultDropTargetAdvisor<local:MockWI> x:Key="targetAdvisor1"/>

Any ideas?


Check out an identical SO question.

0

精彩评论

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