The MSDN link you provided says this pretty well:
This method is used by a component that programmatically sets the value of one of its properties without disabling the declared application using the property. The SetCurrentValue method changes the effective value of the property, but existing triggers, data bindings, and styles will continue to work.
Suppose you write a TextBox control and you find a Text property that people often use as follows:
<TextBox Text="{Binding SomeProperty}"/>
In your control code, if you call SetValue , you rewrite the binding with what you provide. However, if you call SetCurrentValue , make sure that the property accepts the given value, but does not destroy any bindings.
As far as I know, Greg’s advice is incorrect. You should always use GetValue / SetValue from your CLR shell property. SetCurrentValue more useful in scenarios where you need a property to get a given value, but don’t want to overwrite any bindings, triggers or styles that were set up against your property.
Kent Boogaart Nov 20 '10 at 11:01 2010-11-20 11:01
source share