当前位置: 首页>>代码示例>>C#>>正文


C# CheckBox.AddCssClass方法代码示例

本文整理汇总了C#中System.Web.UI.WebControls.CheckBox.AddCssClass方法的典型用法代码示例。如果您正苦于以下问题:C# CheckBox.AddCssClass方法的具体用法?C# CheckBox.AddCssClass怎么用?C# CheckBox.AddCssClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.UI.WebControls.CheckBox的用法示例。


在下文中一共展示了CheckBox.AddCssClass方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InstantiateIn

        /// <summary>
        /// When implemented by a class, defines the <see cref="T:System.Web.UI.Control" /> object that child controls and templates belong to. These child controls are in turn defined within an inline template.
        /// </summary>
        /// <param name="container">The <see cref="T:System.Web.UI.Control" /> object to contain the instances of controls from the inline template.</param>
        public void InstantiateIn( Control container )
        {
            var cell = container as DataControlFieldCell;
            if ( cell != null )
            {
                var selectField = cell.ContainingField as SelectField;
                if ( selectField != null )
                {
                    Literal l = new Literal();
                    l.Text = selectField.HeaderText;
                    cell.Controls.Add( l );

                    if ( selectField.SelectionMode == SelectionMode.Multiple && selectField.ShowHeader )
                    {
                        string colIndex = selectField.ColumnIndex.ToString();
                        CheckBox cb = new CheckBox();
                        cb.ID = "cbSelectHead_" + colIndex;
                        cb.AddCssClass( "select-all" );
                        cell.AddCssClass( "grid-select-field" );
                        cell.Controls.Add( cb );
                    }
                }
            }
        }
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:28,代码来源:SelectField.cs

示例2: CreateChildControls

        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            Controls.Clear();

            _hfOrder = new HiddenField();
            _hfOrder.ID = this.ID + "_hfOrder";
            Controls.Add( _hfOrder );

            _cbVisible = new CheckBox();
            _cbVisible.ID = this.ID + "_cbVisible";
            Controls.Add( _cbVisible );

            _cbEditable = new CheckBox();
            _cbEditable.ID = this.ID + "_cbEditable";
            Controls.Add( _cbEditable );

            _cbRequired = new CheckBox();
            _cbRequired.ID = this.ID + "_cbRequired";
            Controls.Add( _cbRequired );

            _cbHideLabel = new CheckBox();
            _cbHideLabel.ID = this.ID + "_cbHideLabel";
            Controls.Add( _cbHideLabel );

            _cbPreHtml = new CheckBox();
            _cbPreHtml.ID = this.ID + "_cbPreHtml";
            _cbPreHtml.AddCssClass( "js-form-attribute-show-pre-html" );
            Controls.Add( _cbPreHtml );

            _cbPostHtml = new CheckBox();
            _cbPostHtml.ID = this.ID + "_cbPostHtml";
            _cbPostHtml.AddCssClass( "js-form-attribute-show-post-html" );
            Controls.Add( _cbPostHtml );

            _tbPreHtml = new RockTextBox();
            _tbPreHtml.ID = this.ID + "_tbPreHtml";
            _tbPreHtml.TextMode = TextBoxMode.MultiLine;
            _tbPreHtml.Rows = 3;
            _tbPreHtml.ValidateRequestMode = System.Web.UI.ValidateRequestMode.Disabled;
            Controls.Add( _tbPreHtml );

            _tbPostHtml = new RockTextBox();
            _tbPostHtml.ID = this.ID + "_tbPostHtml";
            _tbPostHtml.TextMode = TextBoxMode.MultiLine;
            _tbPostHtml.Rows = 3;
            _tbPostHtml.ValidateRequestMode = System.Web.UI.ValidateRequestMode.Disabled;

            Controls.Add( _tbPostHtml );
        }
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:52,代码来源:WorkflowFormAttributeRow.cs

示例3: CreateChildControls

        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            _cbCurrent = new CheckBox();
            _cbCurrent.ID = this.ID + "_cbCurrent";
            _cbCurrent.AddCssClass( "js-current-date-checkbox" );
            _cbCurrent.Text = "Current Date";
            this.Controls.Add( _cbCurrent );

            _nbDayOffset = new RockTextBox();
            _nbDayOffset.ID = this.ID + "_nbDayOffset";
            _nbDayOffset.Help = "Enter the number of days after the current date to use as the date. Use a negative number to specify days before.";
            _nbDayOffset.AddCssClass( "input-width-md js-current-date-offset" );
            _nbDayOffset.Label = "+- Days";
            this.Controls.Add( _nbDayOffset );
        }
开发者ID:SparkDevNetwork,项目名称:Rock,代码行数:20,代码来源:DatePicker.cs

示例4: CreateChildControls

        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            Controls.Clear();
            RockControlHelper.CreateChildControls( this, Controls );

            _date = new TextBox();
            _date.ID =  "tbDate";
            _date.AddCssClass( "form-control js-datetime-date" );
            Controls.Add( _date );

            _time = new TextBox();
            _time.ID = "tbTime";
            _time.AddCssClass( "form-control js-datetime-time");
            Controls.Add( _time );

            _cbCurrent = new CheckBox();
            _cbCurrent.ID = "cbCurrent";
            _cbCurrent.AddCssClass( "js-current-datetime-checkbox" );
            _cbCurrent.Text = "Current Time";
            this.Controls.Add( _cbCurrent );

            _nbTimeOffset = new RockTextBox();
            _nbTimeOffset.ID = "nbTimeOffset";
            _nbTimeOffset.Help = "Enter the number of minutes after the current time to use as the date. Use a negative number to specify minutes before.";
            _nbTimeOffset.AddCssClass( "input-width-md js-current-datetime-offset" );
            _nbTimeOffset.Label = "+- Minutes";
            this.Controls.Add( _nbTimeOffset );

            RequiredFieldValidator.ControlToValidate = _date.ID;
        }
开发者ID:NewSpring,项目名称:Rock,代码行数:34,代码来源:DateTimePicker.cs


注:本文中的System.Web.UI.WebControls.CheckBox.AddCssClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。