清风的blog 优然探索

用户控件

 


    [Designer(typeof(PagerDesigner))]
    [System.Drawing.ToolboxBitmap(typeof(UsChart), "UsCharts.bmp")]
    public class UsChart : WebControl
    {
        #region 对外提供属性

        [DescriptionAttribute("设置图表的宽度"), DefaultValue("100%"), CategoryAttribute("Chart")]
        public string ChartWidth
        {
            get
            {
                String str = (String)this.ViewState["ChartWidth"];
                if (!string.IsNullOrEmpty(str))
                {
                    return str;
                }
                return "100%";
            }
            set
            {
                this.ViewState["ChartWidth"] = value;
            }
        }
        [DescriptionAttribute("设置图表的高度"), DefaultValue("350px"), CategoryAttribute("Chart")]
        public string ChartHeight
        {
            get
            {
                String str = (String)this.ViewState["ChartHeight"];
                if (!string.IsNullOrEmpty(str))
                {
                    return str;
                }
                return "350px";
            }
            set
            {
                this.ViewState["ChartHeight"] = value;
            }
        }
        [DescriptionAttribute("设置图表的文字"), DefaultValue("图表控件"), CategoryAttribute("Chart")]
        public string ChartDefaultText
        {
            get
            {
                String str = (String)this.ViewState["ChartDefaultText"];
                if (!string.IsNullOrEmpty(str))
                {
                    return str;
                }
                return "图表控件";
            }
            set
            {
                this.ViewState["ChartDefaultText"] = value;
            }
        }

        public bool bIsShowData = false;
        #endregion

2015年5月29日 | 发布:admin | 分类:未分类 | 评论:0

发表留言: