1

I have the following class:

public class DefaultDropTargetAdvisor : IDropTargetAdvisor 
{

I 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?

Vaccano
  • 78,325
  • 149
  • 468
  • 850
  • Does this answer your question? [Can I specify a generic type in XAML (pre .NET 4 Framework)?](https://stackoverflow.com/questions/185349/can-i-specify-a-generic-type-in-xaml-pre-net-4-framework) – BDL Jan 22 '20 at 11:08

1 Answers1

-1

Check out an identical SO question.

Community
  • 1
  • 1
Aviad P.
  • 32,036
  • 14
  • 103
  • 124