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


C# Style.SetRegisteredCssClass方法代码示例

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


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

示例1: 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

示例2: RegisterStyle

		public void RegisterStyle (Style style, IUrlResolutionService urlResolver)
		{
			for (int n=0; n<entries.Count; n++) {
				if (((StyleEntry)entries[n]).Style == style)
					return;
			}
			
			string name = "aspnet_" + entries.Count;
			style.SetRegisteredCssClass (name);
			CreateStyleRule (style, urlResolver, "." + name);
		}
开发者ID:nobled,项目名称:mono,代码行数:11,代码来源:HtmlHead.cs

示例3: RegisterStyle

		public void RegisterStyle (Style baseStyle, string className, HtmlHead head)
		{
			if (head == null)
				return;
			if (String.IsNullOrEmpty (className))
				className = IncrementStyleClassName ();
			baseStyle.SetRegisteredCssClass (className);
			head.StyleSheet.CreateStyleRule (baseStyle, Owner, "." + className);
		}
开发者ID:Profit0004,项目名称:mono,代码行数:9,代码来源:BaseMenuRenderer.cs

示例4: RegisterStyle

		void RegisterStyle (Style baseStyle)
		{
			if (Page.Header == null)
				return;
			string className = IncrementStyleClassName ().Trim ('_');
			baseStyle.SetRegisteredCssClass (className);
			Page.Header.StyleSheet.CreateStyleRule (baseStyle, this, "." + className);
		}
开发者ID:tgiphil,项目名称:mono,代码行数:8,代码来源:TreeView.cs

示例5: RegisterStyle

        private void RegisterStyle(Style style) {
            Debug.Assert(_page.SupportsStyleSheets);
            // The style should not have already been registered
            Debug.Assert(style.RegisteredCssClass.Length == 0);

            if (!style.IsEmpty) {
                string name = Zone.ClientID + "_" + _cssStyleIndex++.ToString(NumberFormatInfo.InvariantInfo);
                _page.Header.StyleSheet.CreateStyleRule(style, Zone, "." + name);
                style.SetRegisteredCssClass(name);
            }
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:11,代码来源:WebPartChrome.cs

示例6: RegisterStyle

        private void RegisterStyle(Style style) {
            Debug.Assert(_menuUser.Page != null && _menuUser.Page.SupportsStyleSheets);

            if (style != null && !style.IsEmpty) {
                // The style should not have already been registered
                Debug.Assert(style.RegisteredCssClass.Length == 0);

                string name = _menuUser.ClientID + "__Menu_" + _cssStyleIndex++.ToString(NumberFormatInfo.InvariantInfo);
                _menuUser.Page.Header.StyleSheet.CreateStyleRule(style, _menuUser.UrlResolver, "." + name);
                style.SetRegisteredCssClass(name);
            }

        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:13,代码来源:WebPartMenu.cs

示例7: RegisterStyle

 private void RegisterStyle(Style style) {
     if (Menu.Page != null && Menu.Page.SupportsStyleSheets) {
         string name = Menu.ClientID + "_" + _cssStyleIndex++.ToString(NumberFormatInfo.InvariantInfo);
         Menu.Page.Header.StyleSheet.CreateStyleRule(style, Menu, "." + name);
         style.SetRegisteredCssClass(name);
     }
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:MenuRendererClassic.cs

示例8: RegisterStyle

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

示例9: ArgumentNullException

            void IStyleSheet.RegisterStyle(Style style, IUrlResolutionService urlResolver) {
                if (style == null) {
                    throw new ArgumentNullException("style");
                }

                if (_styles == null) {
                    _styles = new ArrayList();
                }
                else if (style.RegisteredCssClass.Length != 0) {
                    // if it's already registered, throw an exception
                    throw new InvalidOperationException(SR.GetString(SR.HtmlHead_StyleAlreadyRegistered));
                }

                if (urlResolver == null) {
                    urlResolver = this;
                }

                StyleInfo styleInfo = new StyleInfo();
                styleInfo.style = style;
                styleInfo.urlResolver = urlResolver;

                int index = _autoGenCount++;
                string name = "aspnet_s" + index.ToString(NumberFormatInfo.InvariantInfo);

                style.SetRegisteredCssClass(name);
                _styles.Add(styleInfo);
            }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:27,代码来源:HtmlHead.cs

示例10: ArgumentNullException

 void IStyleSheet.RegisterStyle(Style style, IUrlResolutionService urlResolver)
 {
     if (style == null)
     {
         throw new ArgumentNullException("style");
     }
     if (this._styles == null)
     {
         this._styles = new ArrayList();
     }
     else if (style.RegisteredCssClass.Length != 0)
     {
         throw new InvalidOperationException(System.Web.SR.GetString("HtmlHead_StyleAlreadyRegistered"));
     }
     if (urlResolver == null)
     {
         urlResolver = this;
     }
     StyleInfo info = new StyleInfo {
         style = style,
         urlResolver = urlResolver
     };
     string cssClass = "aspnet_s" + this._autoGenCount++.ToString(NumberFormatInfo.InvariantInfo);
     style.SetRegisteredCssClass(cssClass);
     this._styles.Add(info);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:HtmlHead.cs


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