Variable is not work after apply appearence in devexpress

32 views Asked by At

When opening, the appearance is not applied to the component, I would also like to hide it from the design.cs

It only works if I do this, but then it is generated in Design.cs :

this.Appearance.BorderColor = System.Drawing.Color.DimGray;
[...]
    public class appearanceObject : AppearanceObject
        {
            public appearanceObject(){
                this.BackColor = System.Drawing.Color.DimGray;
                this.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.ForeColor = System.Drawing.Color.White;
                this.Options.UseBackColor = true;
                this.Options.UseFont = true;
                this.Options.UseForeColor = true;
            }
        }
    [ToolboxItem(true)]
        public partial class BaseLookUpEdit : DevExpress.XtraEditors.LookUpEdit
        {
            public BaseLookUpEdit() : base()
            {
                base.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
                this.ResumeLayout(false);
            }
    
            private AppearanceObject appearance_ = new appearanceObject();
            [Browsable(false)]
            [DXCategory("Appearance")]
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //Not WORK!!
            public virtual AppearanceObject Appearance
            {
                get
                {
                    return this.appearance_; //NOT APPLY APPEARENCE
                }
                set
                {
                    this.appearance_ = value;
                }
            }
        }
0

There are 0 answers