Пример #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;
        }
Пример #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;
        }
Пример #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();
        }
Пример #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 ) );
            //    };
            //}
        }
Пример #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;
 }
Пример #7
0
 void WithDynamicValue(Func <CultureInfo, TValue> valueHandler)
 {
     this.property = new DynamicDesignTimeProperty <T, TValue>(this.host, this.property, valueHandler);
 }
Пример #8
0
 void WithLiveSimilarValue <TObject>(Expression <Func <TObject> > liveValueProperty)
 {
     this.property = new LiveDesignTimeProperty <T, TObject>(this.host, this.property, liveValueProperty);
 }
Пример #9
0
 void WithSimilarValue <TObject>(TObject value)
 {
     this.property = new SimilarDesignTimeProperty <T, TObject>(this.host, this.property, value);
 }
Пример #10
0
 void WithLiveValue(Expression <Func <TValue> > liveValueProperty)
 {
     this.property = new LiveDesignTimeProperty <T, TValue>(this.host, this.property, liveValueProperty);
 }
Пример #11
0
 void WithStaticValue(TValue value)
 {
     this.property = new StaticDesignTimeProperty <T, TValue>(this.host, this.property, value);
 }
Пример #12
0
        public IPropertyBuilder <T, TValue> Create(String property)
        {
            this.property = new UnboundedDesignTimeProperty <T, TValue>(this.host, property);

            return(this);
        }
Пример #13
0
 internal void RaisePropertyChanged(DesignTimeProperty property)
 {
     this.OnPropertyChanged(property.Name);
 }
Пример #14
0
 public DynamicDesignTimeProperty(DesignTimeHost <T> host, DesignTimeProperty property, Func <CultureInfo, TValue> valueHandler)
     : base(host, property)
 {
     this.valueHandler = valueHandler;
 }