CommonExtensions.SetIfDifferent Method
Click or drag to resize
CommonExtensionsSetIfDifferent Method
Sets the value of the dependencyProperty property if it's hasn't that value currently.

Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core (in Telerik.Windows.Diagrams.Core.dll) Version: 2018.2.620.40 (2018.2.620.40)
public static bool SetIfDifferent(
	this DependencyObject dependencyObject,
	DependencyProperty dependencyProperty,
	Object value


Type: System.WindowsDependencyObject
The dependency object.
Type: System.WindowsDependencyProperty
The dependency property.
Type: SystemObject
The value to set if currently different.

Return Value

Type: Boolean
Return true if the value was set.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DependencyObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
ArgumentNullException Will be raised if either the dependencyObject or the dependencyProperty is null. The value can however be set to null.
See Also