Click or drag to resize

ExtensionsGetValueFromBindingOrProperty Method

Gets the value of the FrameworkElement's DependencyProperty. If the DependencyProperty is binded, then it will return the value of the binding source. If it is not binded, then it will return the value of the DependencyProperty.

Namespace:  Cauldron.XAML
Assembly:  Cauldron.Win32.WPF (in Cauldron.Win32.WPF.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static Object GetValueFromBindingOrProperty(
	this FrameworkElement frameworkElement,
	DependencyProperty dependencyProperty
)

Parameters

frameworkElement
Type: System.WindowsFrameworkElement
The FrameworkElement to get the value of the DependencyProperty from.
dependencyProperty
Type: System.WindowsDependencyProperty
The DependencyProperty of interest.

Return Value

Type: Object
The value of the DependencyProperty.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type FrameworkElement. 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).
See Also