How can I bind a background color in WPF/XAML?

后端 未结 8 1806
情话喂你
情话喂你 2020-12-05 04:01

What do I have to change to the following code so that the background is red, neither of the 2 ways I tried worked:


(source: deviantsart.com)

8条回答
  •  执念已碎
    2020-12-05 04:47

    I recommend reading the following blog post about debugging data binding: http://beacosta.com/blog/?p=52

    And for this concrete issue: If you look at the compiler warnings, you will notice that you property has been hiding the Window.Background property (or Control or whatever class the property defines).

提交回复
热议问题