使用过Ext的朋友都体会过该JavaScript库的强大,但该库的学习门槛较高。现在有了一个封装了Ext库的Asp.net 服务器控件,当前有二个版本,分别支持.NET2.0和.NET3.5,本人试用的是.NET3.5 版本,内包含ScriptManager、ScriptContainer、HtmlEditor、Panel,DataPicker、HiddenField、RadioButton、Calendar、FieldSet、CheckBox、TextArea、TextBox、NumberTextBox、Window共十四个子控件。
感兴趣的朋友可到下面的地址下载:
Coolite Studio (ASP.NET) Download
演示效果:
如何换肤?
方法有很多:
方法一:在Aspx文件的Head标签内加入
<head runat="server" lang="zh-cn">
    <title>无标题页</title>
    <cool:ScriptContainer ID="ScriptContainer1" runat="server">
    </cool:ScriptContainer>
    <link href="对应皮肤CSS文件的相应路径" rel="stylesheet" type="text/css" />
</head>
方法二:在后置代码中设置:
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        Coolite.Web.UI.ScriptManager.RegisterSessionTheme(Coolite.Web.UI.Theme.Gray);
    }
</script>
或者
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpContext.Current.Session["Coolite.Theme"] = Coolite.Web.UI.Theme.Gray;
    }
</script>
方法三:使用配置文件:

1<?xml version="1.0"?>23<configuration>4<configSections>5<section name="coolite" type="Coolite.Web.UI.GlobalConfig"/>6</configSections>7<!-- COOLITE GLOBAL CONFIGURATION ATTRIBUTES -->8<!-- cleanResourceUrl = true|false 9        The Coolite controls can clean up the autogenerate WebResource Url so they look presentable. 10        Default is true -->11<!-- gzip = true|false 12        Whether to automatically render scripts with gzip compression. 13        Default is true. -->14<!-- scriptAdapter = Ext, jQuery, Prototype, YUI 15        Which script adapter to use. 16        Default is "Ext" -->17<!-- renderScripts = true|false 18        Whether to have the coolite controls output the required JavaScript includes or not.19        Gives developer option of manually including required <script> files. 20        Default is true -->21<!-- renderStyles = true|false 22        Whether to have the coolite controls output the required StyleSheet includes or not.23        Gives developer option of manually including required <link>/<style> files.24        Default is true -->25<!-- scriptMode = Release, Debug 26        Whether to include the Release (condensed) or Debug (with documentation) JavaScript files27        Default is "release" -->28<!-- theme = Default, Gray 29        Which embedded theme to use.30        Default is "Default" -->31<coolite32cleanResourceUrl="true"33     gzip="true"34     scriptAdapter="Ext" 35     renderScripts="true"36     renderStyles="true"37     scriptMode="Release"38     theme="Gray"39/>40</configuration>

本人测试时用的第一种方法,换肤后效果如下:

注:该控件默认只包括二种风格的主题,更多的主题可到ExtJS官方网站下载: http://extjs.com/learn/Ext_Extensions#User_Themes
使用时只需把包内的内容复制到对应目录下即可。默认语言是英文,如何设置为中文?
需到Ext官方网站下载Ext2.0,文件夹里有个ext-lang-zh_CN.js文件,这是中文语言包,添加到网站相应目录下,然后用ScriptManager控件导入js文件即可:
<asp:ScriptManager ID="ScriptManager2" runat="server">
        <Scripts>
           <asp:ScriptReference Path="对应目录/ext-lang-zh_CN.js" />
      </Scripts>
</asp:ScriptManager>

转载于:https://www.cnblogs.com/AndySong/archive/2009/11/01/1593791.html

Coolite 换肤相关推荐

  1. android view设置按钮颜色_Android 主题换肤技术方案分析

    写在前面 Android TV 电视开发,主题换肤,我感觉有两种层级的方式,一种是 系统级,另一种 是应用级, 我记得很早在 Linux 桌面开发的时候,我们之前的公司在GTK+上也实现了一套换肤UI ...

  2. Swift 换肤方案的实现使用SwiftTheme框架

    SwiftTheme 框架进行换肤 本地创建多个plist文件 设置不同图片颜色数组 飞机票 demo Foundationimport SwiftTheme// 创建一个枚举类型进行换肤 enum ...

  3. Spring Boot一键换肤,so easy!

    SpringMVC 源码分析系列最后一篇,和大家聊一聊 Theme. Theme,就是主题,点一下就给网站更换一个主题,相信大家都用过类似功能,这个其实和前面所说的国际化功能很像,代码其实也很像,今天 ...

  4. 关于如何换肤、子类化的解决方案

    对于应用程序的换肤及子类化.下面是我尝试过一些方法,以在CAboutDlg中子类化其中的Button为例: 第一种:直接用现成的类 1.自己写一个类class CButtonXP : public C ...

  5. vue中利用scss实现整体换肤和字体大小设置

    一.前言 利用Sass预处理实现换肤和字体大小调整. 思路及达到的效果:字体大小的适配使用window.devicePixelRatio的值和需要调整的差量进行控制.页面初始化是的字体适配可以根据de ...

  6. android换肤动画,Android-换肤ThemeSkinning使用

    1.png 2.png 3.png 1.集成步骤: 1.添加依赖 compile 'com.solid.skin:skinlibrary:1.4.3' 参考源码版本 2.让你的 Application ...

  7. js变量传递给less_如何利用webpack实现一键换肤(CSS变量替换)

    最近公司项目中有一个需要更换web端主题的需求,基本实现效果如下: 接收到这个需求的时候有三种思路: 打包的时候同时冗余打包多套CSS文件,并在切换主题的时候加载相应的样式文件. 在根组件上加上主题类 ...

  8. 7:MD5、圆形图片、动态换肤

    1.获取一个文件的MD5值(可处理大文件) public static String getSkinMD5(File file) {FileInputStream fis = null;BigInte ...

  9. Android 换肤

    1). 换肤思路 在源应用APP中,下载皮肤包,使得对应的文件资源得以应用.使用DexClassLoader加载资源包,使用反射来获取资源ID. 2). 创建SkinChange工程 图1.png a ...

  10. ASP.Net 使用css换肤(转)

    常常看到有的网站通过DropDownList.菜单或按钮实现对整个网站改变页面风格(换肤).专门Google了一些这方面的资料,总结了一下实现以上功能大致可以分成两类: 1.整个网站统一使用一个CSS ...

最新文章

  1. RGB转YUV 各种库的性能比较
  2. 机器学习知识点(六)增广矩阵求解拉格朗日乘子法的Java实现
  3. 要启用实时(jit)调试 该应用计算机,解决%_启用实时(JIT)调试+编译应用程序时还必须启用方法歩骤?谁有最终解决方案?...
  4. 如果计算机用户有密码 待机,电脑待机密码怎么设置
  5. SAP Spartacus layout设计原理
  6. C++之‘malloc’ was not declared in this scope和invalid conversion from ‘void*’ to ‘char*’
  7. 【原创】jpgraph中文乱码问题的解决
  8. Leetcode--11. 盛水最多的容器
  9. CSS3单词及属性大全
  10. 深度学习实践与部署(开篇)
  11. 决定要放下的人,要不要好好道个别?
  12. 一、计算二进制中1的个数
  13. 安装多个 PHP 版本(PHP7, PHP5)
  14. Win11任务栏怎么变小?Win11任务栏变小的设置方法
  15. 墨刀和Axure RP:设计App原型图就是如此简单
  16. 图像去雾算法(二)基于暗通道先验算法学习笔记
  17. 微信小程序:设置字体跟随手机系统
  18. 利用 Python 分析 MovieLens 1M 数据集
  19. php with函数,string - PHP中的startsWith()和endsWith()函数
  20. Android 语音播报 , 百度在线语音合成封装;

热门文章

  1. rabbitmq的发布订阅
  2. 阶段3 2.Spring_10.Spring中事务控制_11 spring5新特性的介绍
  3. Python 函数参数 传引用还是传值
  4. 漏洞利用之Metasploit使用过程
  5. javascript AOP实现
  6. webservice4
  7. 综合云平台 - 架构 - 01
  8. 2017/4/27 morning
  9. Android开发新手学习总结(一)——使用Android Studio搭建Android集成开发环境
  10. java jdbc 连接mysql 数据库