See the question and my original answer on StackOverflow

All dependency properties have associated metadata with it. The public instance's property get/set methods are merely wrappers over dependency properties GetValue and SetValue methods.

And you can also reset the value to it's default value using the ClearValue method.

In the case of RatingControl, that would be a code like this:


Note this can be seen as a shortcut to:

var dp = RatingControl.ValueProperty;
var def = dp.GetMetadata(typeof(RatingControl)).DefaultValue; // -1d
mainRating.SetValue(dp, def);