private void Detach() { ValueProperty.Detach(OnValueChanged); MaximumProperty.Detach(OnMaximumChanged); }