views:

154

answers:

1

I have a TextBox that I wish to reset its Background property to its default value after changing it to a different colour.

I have tried setting it to SystemColors.WindowBrush, but then, if the Display Settings are updated to change this value, it doesn't get dynamically reflected in the TextBox (it does normally if TextBox.Background hasn't been touched).

Any idea how to do this?

A: 

From what I understand of WPF's binding system, setting it to DependencyProperty.UnsetValue should revert it to WPF figuring out what to do with it.

JustABill
Thanks, that worked perfectly!
Neo