SetPropertyRoute() public static method

public static SetPropertyRoute ( DependencyObject obj, PropertyRoute value ) : void
obj System.Windows.DependencyObject
value PropertyRoute
return void
Esempio n. 1
0
        public override Control CreateView(ModifiableEntity entity, PropertyRoute typeContext)
        {
            if (View == null)
            {
                throw new InvalidOperationException("View not defined in EntitySettings");
            }

            if (typeContext == null && !(entity is IRootEntity))
            {
                throw new ArgumentException("An EmbeddedEntity neeed TypeContext");
            }

            Control control = View((T)entity);

            Common.SetPropertyRoute(control, typeContext ?? PropertyRoute.Root(entity.GetType()));

            return(control);
        }
Esempio n. 2
0
 static void OnSetTypeContext(DependencyObject sender, DependencyPropertyChangedEventArgs args)
 {
     Common.SetPropertyRoute(sender, args.NewValue == null ? null : PropertyRoute.Root((Type)args.NewValue));
 }
Esempio n. 3
0
 public AutoControl(Type type)
     : this()
 {
     Common.SetPropertyRoute(this, PropertyRoute.Root(type));
 }