[DefaultValue(typeof(BorderStyle), "NotSet"), NotifyParentProperty(true)]

     public BorderStyle StyleBottom
     {
         get
         {
             object obj2 = this.ViewState[ColorTopID];
             if (obj2 is BorderStyle)
             {
                 return (BorderStyle)obj2;
             }
             return BorderStyle.NotSet;
         }
         set
         {
             this.ViewState[ColorTopID] = value;
         }
     }

 

不要使用DefaultValue(typeof(0)),这样设置后在属性页里并非是默认值
posted on 2011-08-17 14:00  账号难注册  阅读(208)  评论(0编辑  收藏  举报