public static BindingExpressionBase To2 <TObject>(this BindingPrefix @this, TObject source, Expression <Func <TObject, object> > pathExpression) where TObject : DependencyObject { var name = pathExpression.GetMemberInfo().Name; return(@this.To2(source, name)); }
public static BindingExpressionBase To(this BindingPrefix @this, DependencyProperty property2, object source) { var binding = new Binding(property2.Name) { Source = source }; return(BindingOperations.SetBinding(@this.DependencyObject, @this.DependencyProperty, binding)); }
public static BindingExpressionBase To(this BindingPrefix @this, string path, RelativeSource relativeSource) { var binding = new Binding { RelativeSource = relativeSource, Path = new PropertyPath(path) }; return(BindingOperations.SetBinding(@this.DependencyObject, @this.DependencyProperty, binding)); }