i do have a textbox. When there is error i set borderbrush to new SolidColorBrush(Colors.Red). When error is fixed, i want to switch to default color of border of a textbox. I am doing it in codebehind not xaml.
However it is system dependent. I noticed there is something like
SystemColor.ActiveControl etc. Should i use these and if yes, which one is default border of textbox?
Also i noticed there is something like Textbox.borderbrushproperty.defaultmetadata.defaultvalue, which i did not manage to work.
Any ideas how to switch to default borderbrush? thank you.
Why not just save the initial value at startup and use that? You should be able to use the system colors, but if you ever change the default color this will continue to work.