WPF: reverting brush to default/original

前端 未结 5 824
不知归路
不知归路 2021-02-05 03:10

I\'m a complete newbie at WPF.

At the moment I\'m making a usercontrol for form elements called \"LabeledTextbox\" which contains a label, a textbox and a textblock for

5条回答
  •  迷失自我
    2021-02-05 03:37

    I may be late to the party, but for future readers, you can also use Button.BackgroundProperty.DefaultMetadata.DefaultValue for this purpose. This is especially useful when you're using a Converter where you need to return a value and therefore cannot use ClearValue() call.

提交回复
热议问题