示例#1
0
 /// <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);
示例#2
0
 /// <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);