예제 #1
0
        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));
        }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }