WPF: reverting brush to default/original

前端 未结 5 831
不知归路
不知归路 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:33

    You could use

    _textBox.ClearValue(TextBox.BorderBrushProperty);
    

    That will remove the directly assigned value and go back to the value defined by the style or template.

提交回复
热议问题