Ejemplo n.º 1
0
        public void Handle(InvokeContext ctx)
        {
            FailIfXamlNotAFrameworkElement(ctx);
            var propertyName = ctx.Name.Replace("OneWayBind", "").Replace("Bind", "");
            var depProp = ctx.XamlType
                .FindDependencyProperty(propertyName)
                .MustHaveValue(new ArgumentException("No DependencyProperty '{0}' found on type '{1}'".Fmt(propertyName, ctx.XamlType.Name)));

            ctx.AddSetterWith(ctx.NewBindSetterContext(depProp));
        }
Ejemplo n.º 2
0
        public void Handle(InvokeContext ctx)
        {
            FailIfXamlNotAFrameworkElement(ctx);
            var propertyName = ctx.Name.Replace("OneWayBind", "").Replace("Bind", "");
            var depProp      = ctx.XamlType
                               .FindDependencyProperty(propertyName)
                               .MustHaveValue(new ArgumentException("No DependencyProperty '{0}' found on type '{1}'".Fmt(propertyName, ctx.XamlType.Name)));

            ctx.AddSetterWith(ctx.NewBindSetterContext(depProp));
        }
Ejemplo n.º 3
0
        public void Handle(InvokeContext ctx)
        {
            GuardAgainstSignatureFailures(ctx);
            var attachProp = (DependencyProperty)ctx.Values[0];

            if (ctx.IsArgumentNameSpecified("path"))
                ctx.AddSetterWith(ctx.NewBindSetterContext(attachProp));
            else
            {
                var value = ctx.Values[1];
                ctx.AddSetterWith<DependencyObject>(xaml => xaml.SetValue(attachProp, value));
            }
        }
Ejemplo n.º 4
0
        public void Handle(InvokeContext ctx)
        {
            GuardAgainstSignatureFailures(ctx);
            var attachProp = (DependencyProperty)ctx.Values[0];

            if (ctx.IsArgumentNameSpecified("path"))
            {
                ctx.AddSetterWith(ctx.NewBindSetterContext(attachProp));
            }
            else
            {
                var value = ctx.Values[1];
                ctx.AddSetterWith <DependencyObject>(xaml => xaml.SetValue(attachProp, value));
            }
        }