Style.TargetType = Interface || abstract class
-
Hi folks! Is it possible to define the targettype of a style to be an interface or an abstract class. Something like this (in pseudo code)
Style s = new Style();
s.TargetType = class where inherit from baseclassor
Style s = new Style();
s.TargetType = class which implements given interfaceThis is needed for creating a generic dragdrop element, where the items in the source can be derived classes. e.g:
abstract class DDItem
{
public T Identifier {get;set;}
public Q DisplayableContent {get;set;}
}/*Doesn't work like that*/
<EventSetter Event="MouseLeftButtonDown" Handler="Drag"/>Would be fine to do this in plain c# as well. Help would be appreciated!
-
Hi folks! Is it possible to define the targettype of a style to be an interface or an abstract class. Something like this (in pseudo code)
Style s = new Style();
s.TargetType = class where inherit from baseclassor
Style s = new Style();
s.TargetType = class which implements given interfaceThis is needed for creating a generic dragdrop element, where the items in the source can be derived classes. e.g:
abstract class DDItem
{
public T Identifier {get;set;}
public Q DisplayableContent {get;set;}
}/*Doesn't work like that*/
<EventSetter Event="MouseLeftButtonDown" Handler="Drag"/>Would be fine to do this in plain c# as well. Help would be appreciated!