/// <summary> /// Get the value of the source of the given <see cref="Binding"/>. /// </summary> /// <param name="binding">The <see cref="Binding"/> of interest.</param> /// <returns>The value of the <see cref="DependencyProperty"/>.</returns> public static object GetValue(this Binding binding) => XAMLHelper.GetPropertyValueFromPath(binding.Source, binding.Path.Path);
/// <summary> /// Get the value of the source of the given <see cref="BindingExpression"/>. /// </summary> /// <param name="bindingExpression">The <see cref="BindingExpression"/> of interest.</param> /// <returns>The value of the <see cref="DependencyProperty"/>.</returns> public static object GetValue(this BindingExpression bindingExpression) => XAMLHelper.GetPropertyValueFromPath(bindingExpression.DataItem, bindingExpression.ParentBinding.Path.Path);