Ejemplo n.º 1
0
        protected DesignTimeProperty( Type componentType, DesignTimeProperty sourceProperty )
            : base( sourceProperty.Name, null )
        {
            this._componentType = componentType;

            this._isReadOnly = sourceProperty.IsReadOnly;
            this.IsLocalizableResource = sourceProperty.IsLocalizableResource;
            this.CulturePropertyName = sourceProperty.CulturePropertyName;
        }
Ejemplo n.º 2
0
        protected DesignTimeProperty(Type componentType, DesignTimeProperty sourceProperty)
            : base(sourceProperty.Name, null)
        {
            this._componentType = componentType;

            this._isReadOnly           = sourceProperty.IsReadOnly;
            this.IsLocalizableResource = sourceProperty.IsLocalizableResource;
            this.CulturePropertyName   = sourceProperty.CulturePropertyName;
        }
Ejemplo n.º 3
0
        public LiveDesignTimeProperty(DesignTimeHost <T> host, DesignTimeProperty property, Expression <Func <TValue> > liveValueProperty)
            : base(host, property)
        {
            PropertyObserver.For(host)
            .Observe(liveValueProperty.GetMemberName(), (s, e) =>
            {
                this.host.RaisePropertyChanged(this);
            });

            this.liveValueProperty = liveValueProperty;
            this.liveValueDelegate = this.liveValueProperty.Compile();
        }
Ejemplo n.º 4
0
        public SimilarDesignTimeProperty(DesignTimeHost <T> host, DesignTimeProperty property, TValue value)
            : base(host, property)
        {
            this.value = value;

            //var idtl = this.value as IDesignTimeList;
            //if( idtl != null )
            //{
            //    idtl.Name = this.Name;
            //    idtl.GetPropertiesHandler = attributes =>
            //    {
            //        return TypeDescriptor.GetProperties( typeof( TValue ) );
            //    };
            //}
        }
Ejemplo n.º 5
0
 public StaticDesignTimeProperty(DesignTimeHost <T> host, DesignTimeProperty property, TValue value)
     : base(host, property)
 {
     this.value = value;
 }
 protected DesignTimeProperty(DesignTimeHost <T> host, DesignTimeProperty property)
     : base(typeof(T), property)
 {
     this.host = host;
 }
Ejemplo n.º 7
0
 void WithDynamicValue(Func <CultureInfo, TValue> valueHandler)
 {
     this.property = new DynamicDesignTimeProperty <T, TValue>(this.host, this.property, valueHandler);
 }
Ejemplo n.º 8
0
 void WithLiveSimilarValue <TObject>(Expression <Func <TObject> > liveValueProperty)
 {
     this.property = new LiveDesignTimeProperty <T, TObject>(this.host, this.property, liveValueProperty);
 }
Ejemplo n.º 9
0
 void WithSimilarValue <TObject>(TObject value)
 {
     this.property = new SimilarDesignTimeProperty <T, TObject>(this.host, this.property, value);
 }
Ejemplo n.º 10
0
 void WithLiveValue(Expression <Func <TValue> > liveValueProperty)
 {
     this.property = new LiveDesignTimeProperty <T, TValue>(this.host, this.property, liveValueProperty);
 }
Ejemplo n.º 11
0
 void WithStaticValue(TValue value)
 {
     this.property = new StaticDesignTimeProperty <T, TValue>(this.host, this.property, value);
 }
Ejemplo n.º 12
0
        public IPropertyBuilder <T, TValue> Create(String property)
        {
            this.property = new UnboundedDesignTimeProperty <T, TValue>(this.host, property);

            return(this);
        }
Ejemplo n.º 13
0
 internal void RaisePropertyChanged(DesignTimeProperty property)
 {
     this.OnPropertyChanged(property.Name);
 }
Ejemplo n.º 14
0
 public DynamicDesignTimeProperty(DesignTimeHost <T> host, DesignTimeProperty property, Func <CultureInfo, TValue> valueHandler)
     : base(host, property)
 {
     this.valueHandler = valueHandler;
 }