How can I get a trigger to change the color of a TextBlock based on a DataContext Property?

后端 未结 3 1394
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-02 17:11

Why does the following code get the runtime error:

Members of the Triggers collection must be of type EventTrigger

But the Event

3条回答
  •  臣服心动
    2021-01-02 17:43

    There is a typo as you did not close out Style.Triggers. And I found I needed to use the property TextBlock.Background. Thanks, you got me to the solution.

        
            
        
    

提交回复
热议问题