How to assign WPF resources to other resource tags

后端 未结 2 1638
情深已故
情深已故 2020-12-30 10:47

This is quite obscure, I may just be missing something extremely simple.

Scenario 1

Lets say I create a gradient brush, like this in my

2条回答
  •  长发绾君心
    2020-12-30 11:33

    The markup you're working with doesn't go up far enough. You don't create a LinearGradientBrush, your first example: you just reference the resource. For example:

    In your second example, I'd say that you want to declare the array as a resource:

    
      
      
    
    

    And then you can use

    
    

提交回复
热议问题