Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I clear the value set by SetCurrentValue in WPF?

For a DependencyProperty, I set a value using DependencyObject.SetCurrentValue(property, value). How does one unset the value so that the property evaluates to the normal local value again?

like image 714
Kevin Hsu Avatar asked Aug 15 '11 15:08

Kevin Hsu


1 Answers

Calling InvalidateProperty will force the value to be reevaluated, and it appears to ignore the "current" value, so it effectively will unset it.

like image 65
nmclean Avatar answered Nov 08 '22 07:11

nmclean