d:DesignInstance with an interface type

前端 未结 4 593
-上瘾入骨i
-上瘾入骨i 2020-12-06 09:39

I\'m binding an UI to an interface (which is implemented by several presenters, not accessible from the UI assembly).

I really like d:DesignInstance in designer beca

4条回答
  •  星月不相逢
    2020-12-06 09:53

    I've found out how it's possible to overcome this illogical Visual Studio XAML designer error.

    Instead of

    
        
    
    

    You can write

    
        
            
        
        
    
    

    Yes, this solution doesn't look as cool but definitely it isn't much worse.

    Type tag allows specifying interfaces, nested types (e.g. n:A+B) and even generics!

    In case of generics just add a backtick and number of type arguments to your type: .

    BTW all of these also works with styles, doesn't produce errors!

提交回复
热议问题