/// <summary> /// Evaluates the specified source. /// </summary> /// <param name="source">The object used as a source for the evaluation.</param> /// <param name="binding">The binding.</param> /// <returns>The evaluated binding.</returns> public static T GetBindingValue(Binding binding, object source) { var eval = new BindingEvaluator <T>(binding); return(eval.GetBindingValue(source)); }
/// <summary> /// Evaluates the specified source. /// </summary> /// <param name="bindingExpression">The binding.</param> /// <returns>The evaluated binding.</returns> public static T GetBindingValue(BindingExpression bindingExpression) { var eval = new BindingEvaluator <T>(bindingExpression.ParentBinding); return(eval.GetBindingValue(bindingExpression.DataItem)); }