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

后端 未结 8 1804
情话喂你
情话喂你 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:41

    You can still use "Background" as the property name, as long as you give your window a name and use this name on the "Source" of the Binding.

提交回复
热议问题