• ASP.NET2.0瞎记____主题皮肤


    在新建skin文件的时候,VS2005自动生成一段文字已经写的很清楚了。
    默认的外观模板。以下外观仅作为示例提供。

    1. 命名的控件外观。SkinId 的定义应唯一,因为在同一主题中不允许一个控件类型有重复的 SkinId。

    <asp:GridView runat="server" SkinId="gridviewSkin" BackColor="White" >
       <AlternatingRowStyle BackColor="Blue" />
    </asp:GridView>

    2. 默认外观。未定义 SkinId。在同一主题中每个控件类型只允许有一个默认的控件外观。

    <asp:Image runat="server" ImageUrl="~/images/image1.jpg" />
    <asp:TextBox runat="server" BorderColor="red" BackColor="white" BorderStyle="dotted" />
    --%>

    ——————————————————————————————————————————
    EnableTheming可以控制skin是否对控件起作用
    —————————————————————————————————————————— StyleSheetTheme的工作和应用方式与普通主题相似。只不过当使用StyleSheetTheme时,
    控件皮肤的设置可以被页面中声明的同一类型控件的相同属性所替代。
    个人认为StyleSheetTheme更有为有用。
    ——————————————————————————————————————————
    为应用程序指定
    web.config

    <system.web>
        <page Theme="主题名" | StyleSheetTheme="主题名">
    </system.web>
    禁用主题
    <system.web>
        <page Theme="" | StyleSheetTheme="">
    </system.web>
    ——————————————————————————————————————————
    动态加载主题
      protected override void OnPreInit(EventArgs e)
        {
            base.OnPreInit(e);
           this.TextBox1.SkinID = "Red";
        }
    ——————————————————————————————————————————
  • 相关阅读:
    HTML中select标签单选多选详解
    meta name="viewport" content="width=device-width,initial-scale=1.0" 解释
    鼠标点击变色 lvha
    html 标签释义
    百度首页top设置
    html css 笔记
    iOS 遍历控件
    iOS 状态栏更改为白色
    iOS UIModalPresentationFormSheet风格下的键盘隐藏
    iOS Xcode之SVN(remove git)
  • 原文地址:https://www.cnblogs.com/mmmhhhlll/p/439113.html
Copyright © 2020-2023  润新知