• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# WebControls.Style类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Style类属于System.Web.UI.WebControls命名空间,在下文中一共展示了Style类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CopyFrom

 public override void CopyFrom(Style s)
 {
     if ((s != null) && !s.IsEmpty)
     {
         base.CopyFrom(s);
         if (s is TableItemStyle)
         {
             TableItemStyle style = (TableItemStyle) s;
             if (s.RegisteredCssClass.Length != 0)
             {
                 if (style.IsSet(0x40000))
                 {
                     base.ViewState.Remove("Wrap");
                     base.ClearBit(0x40000);
                 }
             }
             else if (style.IsSet(0x40000))
             {
                 this.Wrap = style.Wrap;
             }
             if (style.IsSet(0x10000))
             {
                 this.HorizontalAlign = style.HorizontalAlign;
             }
             if (style.IsSet(0x20000))
             {
                 this.VerticalAlign = style.VerticalAlign;
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:31,代码来源:TableItemStyle.cs


示例2: CopyFrom

 public override void CopyFrom(Style s)
 {
     if (s != null)
     {
         base.CopyFrom(s);
         SubMenuStyle style = s as SubMenuStyle;
         if ((style != null) && !style.IsEmpty)
         {
             if (s.RegisteredCssClass.Length != 0)
             {
                 if (style.IsSet(0x10000))
                 {
                     base.ViewState.Remove("VerticalPadding");
                     base.ClearBit(0x10000);
                 }
                 if (style.IsSet(0x20000))
                 {
                     base.ViewState.Remove("HorizontalPadding");
                     base.ClearBit(0x20000);
                 }
             }
             else
             {
                 if (style.IsSet(0x10000))
                 {
                     this.VerticalPadding = style.VerticalPadding;
                 }
                 if (style.IsSet(0x20000))
                 {
                     this.HorizontalPadding = style.HorizontalPadding;
                 }
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:35,代码来源:SubMenuStyle.cs


示例3: CreateTemplateEditingFrame

 protected override ITemplateEditingFrame CreateTemplateEditingFrame(TemplateEditingVerb verb)
 {
     ITemplateEditingService service = (ITemplateEditingService) this.GetService(typeof(ITemplateEditingService));
     DataGrid viewControl = (DataGrid) base.ViewControl;
     Style[] templateStyles = new Style[] { viewControl.ItemStyle, viewControl.EditItemStyle, viewControl.HeaderStyle, viewControl.FooterStyle };
     return service.CreateFrame(this, verb.Text, ColumnTemplateNames, viewControl.ControlStyle, templateStyles);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:DataGridDesigner.cs


示例4: DynamicMenuPopoutGroup

 //***************************************************************************
 // Class Constructors
 // 
 public DynamicMenuPopoutGroup(DynamicMenuItemCollection items, Style itemStyle, Style activeStyle, Style hoverStyle)
     : base(null, itemStyle, activeStyle, hoverStyle)
 {
     this._assocDivs = new Collections.StringCollection();
     this._menuItems = items;
     //this._menuItems.Updated += new Collections.CollectionEventHandler(menuItems_Updated);
 }
开发者ID:tenshino,项目名称:RainstormStudios,代码行数:10,代码来源:PopoutMenu.cs


示例5: RenderRepeater

		// What is baseControl for ?
		public void RenderRepeater (HtmlTextWriter w, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
		{
			PrintValues (user);
			RepeatLayout layout = RepeatLayout;
			bool listLayout = layout == RepeatLayout.OrderedList || layout == RepeatLayout.UnorderedList;

			if (listLayout) {
				if (user != null) {
					if ((user.HasHeader || user.HasFooter || user.HasSeparators))
						throw new InvalidOperationException ("The UnorderedList and OrderedList layouts do not support headers, footers or separators.");
				}

				if (OuterTableImplied)
					throw new InvalidOperationException ("The UnorderedList and OrderedList layouts do not support implied outer tables.");

				int cols = RepeatColumns;
				if (cols > 1)
					throw new InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.");
			}
			if (RepeatDirection == RepeatDirection.Vertical) {
				if (listLayout)
					RenderList (w, user, controlStyle, baseControl);
				else
					RenderVert (w, user, controlStyle, baseControl);
			} else {
				if (listLayout)
						throw new InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.");
				RenderHoriz (w, user, controlStyle, baseControl);
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:31,代码来源:RepeatInfo.cs


示例6: Add

		public NamedCssStyleCollection Add (Style style)
		{
			if (style != null)
				CopyFrom (style.GetStyleAttributes (null));

			return this;
		}
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:NamedCssStyleCollection.cs


示例7: GetLoginInterface

        /// <summary>
        /// Must create and return the control 
        /// that will show the logon interface.
        /// If none is available returns null
        /// </summary>
        public Control GetLoginInterface(Style controlStyle)
        {
            this._uIdTable = new Table();
            TableCell cell = new TableCell();
            TableRow row = new TableRow();
            Button child = new Button();
            child.Click += new EventHandler(this.OnUIdSubmit);

            this._uIdTextBox = new TextBox();
            this._uIdTextBox.CssClass = "lddl";
            //this._uIdTable.ControlStyle.Font.CopyFrom(controlStyle.Font);
            this._uIdTable.ControlStyle.CssClass = "tablelddl ";
            this._uIdTable.Width = Unit.Percentage(100.0);
            child.Text = ResourceManager.GetString("SubmitUId");
            child.CssClass = "btn btn-primary btn-xs bw";

            cell.Controls.Add(new LiteralControl(ResourceManager.GetString("EnterUIdMessage", this.LanguageCode)));
            row.Cells.Add(cell);
            this._uIdTable.Rows.Add(row);
            cell = new TableCell();
            row = new TableRow();
            cell.Controls.Add(this._uIdTextBox);
            cell.Controls.Add(child);
            row.Cells.Add(cell);
            this._uIdTable.Rows.Add(row);
            return this._uIdTable;
        }
开发者ID:ChrisNelsonPE,项目名称:surveyproject_main_public,代码行数:32,代码来源:EmailWebSecurityAddIn.cs


示例8: CopyFrom

        /// <devdoc>
        ///    Copies non-blank elements from the specified style, overwriting existing
        ///    style elements if necessary.
        /// </devdoc>
        public override void CopyFrom(Style s) {
            if (s != null) {
                base.CopyFrom(s);

                SubMenuStyle sms = s as SubMenuStyle;
                if (sms != null && !sms.IsEmpty) {
                    // Only copy the paddings if they aren't in the source Style's registered CSS class
                    if (s.RegisteredCssClass.Length != 0) {
                        if (sms.IsSet(PROP_VPADDING)) {
                            ViewState.Remove("VerticalPadding");
                            ClearBit(PROP_VPADDING);
                        }

                        if (sms.IsSet(PROP_HPADDING)) {
                            ViewState.Remove("HorizontalPadding");
                            ClearBit(PROP_HPADDING);
                        }
                    }
                    else {
                        if (sms.IsSet(PROP_VPADDING)) {
                            this.VerticalPadding = sms.VerticalPadding;
                        }

                        if (sms.IsSet(PROP_HPADDING)) {
                            this.HorizontalPadding = sms.HorizontalPadding;
                        }
                    }
                }
            }
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:34,代码来源:SubMenuStyle.cs


示例9: CopyFrom

 public override void CopyFrom(Style s)
 {
     if ((s != null) && !s.IsEmpty)
     {
         base.CopyFrom(s);
         if (s is DataGridPagerStyle)
         {
             DataGridPagerStyle style = (DataGridPagerStyle) s;
             if (style.IsSet(0x80000))
             {
                 this.Mode = style.Mode;
             }
             if (style.IsSet(0x100000))
             {
                 this.NextPageText = style.NextPageText;
             }
             if (style.IsSet(0x200000))
             {
                 this.PrevPageText = style.PrevPageText;
             }
             if (style.IsSet(0x400000))
             {
                 this.PageButtonCount = style.PageButtonCount;
             }
             if (style.IsSet(0x800000))
             {
                 this.Position = style.Position;
             }
             if (style.IsSet(0x1000000))
             {
                 this.Visible = style.Visible;
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:35,代码来源:DataGridPagerStyle.cs


示例10: BuildRow

 /// <summary>
 /// Build a row with the given control and style
 /// </summary>
 /// <param name="child"></param>
 /// <param name="rowStyle"></param>
 /// <param name="labelText"></param>
 /// <returns></returns>
 protected TableRow BuildRow(Control child, string labelText, Style rowStyle)
 {
     TableRow row = new TableRow();
     TableCell cell = new TableCell();
     if (labelText != null)
     {
         Label label = new Label();
         label.ControlStyle.Font.Bold = true;
         label.Text = labelText;
         cell.Controls.Add(label);
         cell.Wrap = false;
         if (child == null) cell.ColumnSpan = 2;
         cell.VerticalAlign = VerticalAlign.Top;
         row.Cells.Add(cell);
  
         cell = new TableCell();
     }
     else
     {
         cell.ColumnSpan = 2;
     }
     if (child != null)
     {
         cell.Controls.Add(child);
     }
     row.Cells.Add(cell);
     row.ControlStyle.CopyFrom(rowStyle); //CSS .addinsLayout
     return row;
 }
开发者ID:ChrisNelsonPE,项目名称:surveyproject_main_public,代码行数:36,代码来源:EntryQuotaSecurityAddIn.cs


示例11: CreateEditorPartChromeStyle

 protected virtual Style CreateEditorPartChromeStyle(EditorPart editorPart, PartChromeType chromeType)
 {
     if (editorPart == null)
     {
         throw new ArgumentNullException("editorPart");
     }
     if ((chromeType < PartChromeType.Default) || (chromeType > PartChromeType.BorderOnly))
     {
         throw new ArgumentOutOfRangeException("chromeType");
     }
     if ((chromeType == PartChromeType.BorderOnly) || (chromeType == PartChromeType.TitleAndBorder))
     {
         return this.Zone.PartChromeStyle;
     }
     if (this._chromeStyleNoBorder == null)
     {
         Style style = new Style();
         style.CopyFrom(this.Zone.PartChromeStyle);
         if (style.BorderStyle != BorderStyle.None)
         {
             style.BorderStyle = BorderStyle.None;
         }
         if (style.BorderWidth != Unit.Empty)
         {
             style.BorderWidth = Unit.Empty;
         }
         if (style.BorderColor != Color.Empty)
         {
             style.BorderColor = Color.Empty;
         }
         this._chromeStyleNoBorder = style;
     }
     return this._chromeStyleNoBorder;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:34,代码来源:EditorPartChrome.cs


示例12: CreateControlStyle

			protected override Style CreateControlStyle ()
			{
				Style s = new Style (new StateBag ());
				s.BackColor = Color.Red;
				s.BorderColor = Color.Red;
				return s;
			}
开发者ID:kumpera,项目名称:mono,代码行数:7,代码来源:PanelTest.cs


示例13: GetAdministrationInterface

 /// <summary>
 /// Must create and return the control 
 /// that will show the administration interface
 /// If none is available returns null
 /// </summary>
 public Control GetAdministrationInterface(Style controlStyle)
 {
     this._adminTable = new Table();
     this._adminTable.ControlStyle.CopyFrom(controlStyle);
     this._adminTable.Width = Unit.Percentage(100);
     TableCell cell = new TableCell();
     TableRow row = new TableRow();
     cell.ColumnSpan = 2;
     cell.Text = ResourceManager.GetString("NSurveySecurityAddinDescription", this.LanguageCode);
     row.Cells.Add(cell);
     this._adminTable.Rows.Add(row);
     cell = new TableCell();
     row = new TableRow();
     CheckBox child = new CheckBox();
     child.Checked = new Surveys().NSurveyAllowsMultipleSubmissions(this.SurveyId);
     Label label = new Label();
     label.ControlStyle.Font.Bold = true;
     label.Text = ResourceManager.GetString("MultipleSubmissionsLabel", this.LanguageCode);
     cell.Width = Unit.Percentage(50);
     cell.Controls.Add(label);
     row.Cells.Add(cell);
     cell = new TableCell();
     child.CheckedChanged += new EventHandler(this.OnCheckBoxChange);
     child.AutoPostBack = true;
     cell.Controls.Add(child);
     Unit.Percentage(50);
     row.Cells.Add(cell);
     this._adminTable.Rows.Add(row);
     return this._adminTable;
 }
开发者ID:ChrisNelsonPE,项目名称:surveyproject_main_public,代码行数:35,代码来源:NSurveyContextSecurityAddIn.cs


示例14: AddStyles

 public StyleBlockStyles AddStyles(Style style)
 {
     if (style != null)
     {
         this.AddStyles(style.GetStyleAttributes(this._styleControl));
     }
     return this;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:StyleBlockStyles.cs


示例15: CopyStyle

 private void CopyStyle(Style toStyle, Style fromStyle)
 {
     if ((fromStyle != null) && fromStyle.IsSet(0x2000))
     {
         toStyle.Font.Underline = fromStyle.Font.Underline;
     }
     toStyle.CopyFrom(fromStyle);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:SiteMapPath.cs


示例16: GetItemStyle

			protected override Style GetItemStyle (ListItemType itemType, int repeatIndex)
			{
				Style s = new Style ();
				s.BackColor = Color.Red;
				s.BorderStyle = BorderStyle.Solid;
				WebTest.CurrentTest.UserData = "GetItemStyle";
				return s;
			}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:RadioButtonListTest.cs


示例17: CommonPager

 //BoundControl_DataBound方法利用HasParentControlCalledDataBinding检查是否已经创建了Builder,
 //如果是,则不再执行寻找适当Builder的操作。Adapters表的初始化在构造函数中完成:
 public CommonPager()
 {
     SelectedPager = new System.Web.UI.WebControls.Style();
     UnselectedPager = new System.Web.UI.WebControls.Style();
     _adapters = new AdapterCollection();
     _adapters.Add(typeof(DataTable), new DataTableAdapterBuilder());
     _adapters.Add(typeof(DataView), new DataViewAdapterBuilder());
 }
开发者ID:romanu6891,项目名称:fivemen,代码行数:10,代码来源:CommonPager.cs


示例18: TemplateEditingFrame

 internal TemplateEditingFrame(string frameName, string[] templateNames, Style controlStyle, Style[] templateStyles)
 {
     this._name = frameName;
     this._templateNames = templateNames;
     this._controlStyle = controlStyle;
     this._templateStyles = templateStyles;
     this._changeTable = new HybridDictionary(false);
 }
开发者ID:ikvm,项目名称:webmatrix,代码行数:8,代码来源:TemplateEditingFrame.cs


示例19: RegisterStyle

 private void RegisterStyle(Style style)
 {
     if ((style != null) && !style.IsEmpty)
     {
         string cssClass = this._menuUser.ClientID + "__Menu_" + this._cssStyleIndex++.ToString(NumberFormatInfo.InvariantInfo);
         this._menuUser.Page.Header.StyleSheet.CreateStyleRule(style, this._menuUser.UrlResolver, "." + cssClass);
         style.SetRegisteredCssClass(cssClass);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:WebPartMenu.cs


示例20: BaseMenu

 public BaseMenu(string clientId, bool isRightToLeft, Action<HtmlTextWriter, MenuItem, int> renderDynamicItem, SubMenuStyle dynamicMenuStyle, Style dynamicMenuItemStyle, Style dynamicHoverStyle)
 {
     IsRightToLeft = isRightToLeft;
     this.renderDynamicItem = renderDynamicItem;
     DynamicMenuItemStyle = dynamicMenuItemStyle;
     DynamicHoverStyle = dynamicHoverStyle;
     DynamicMenuStyle = dynamicMenuStyle;
     ClientID = clientId;
 }
开发者ID:Jeff-Tian,项目名称:IZWebFileManager,代码行数:9,代码来源:BaseMenu.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WebControls.Table类代码示例发布时间:2022-05-26
下一篇:
C# WebControls.SqlDataSourceStatusEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap