http://www.webdesignerwall.com/demo/css-buttons.html

    public class GradientButtons : DevComponents.DotNetBar.PanelEx
{
#region 私有函数
System.Drawing.Color RGB(string red_green_blue)
{
int red = Convert.ToInt32(red_green_blue.Substring(, ), );
int green = Convert.ToInt32(red_green_blue.Substring(, ), );
int blue = Convert.ToInt32(red_green_blue.Substring(, ), );
return RGB(red, green, blue);
}
System.Drawing.Color RGB(int red, int green, int blue)
{
return System.Drawing.Color.FromArgb(((int)(((byte)(red)))), ((int)(((byte)(green)))), ((int)(((byte)(blue)))));
}
#endregion
public GradientButtons()
{
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.CanvasColor = System.Drawing.SystemColors.Control;
this.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.DisabledBackColor = System.Drawing.Color.Empty;
this.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.Style.Alignment = System.Drawing.StringAlignment.Center;
this.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.Style.GradientAngle = ;
}
public enum ColorStyles
{
black, gray, white, orange, red, blue, rosy, green, pink
} public void styleClass(ColorStyles colorStyles)
{
switch (colorStyles)
{
case ColorStyles.black:
this.Style.ForeColor.Color = RGB("d7d7d7");
this.Style.BorderColor.Color = RGB("");
this.Style.BackColor1.Color = RGB("");
this.Style.BackColor2.Color = RGB("");
this.StyleMouseOver.BackColor1.Color = RGB("");
this.StyleMouseOver.BackColor2.Color = RGB("");
this.StyleMouseDown.BackColor1.Color = RGB("");
this.StyleMouseDown.BackColor2.Color = RGB("");
break;
case ColorStyles.gray:
this.Style.ForeColor.Color = RGB("e9e9e9"); this.Style.BorderColor.Color = RGB("");
this.Style.BackColor1.Color = RGB("");
this.Style.BackColor2.Color = RGB(""); this.StyleMouseOver.BackColor1.Color = RGB("");
this.StyleMouseOver.BackColor2.Color = RGB("4b4b4b"); this.StyleMouseDown.BackColor1.Color = RGB("");
this.StyleMouseDown.BackColor2.Color = RGB("");
break;
case ColorStyles.white:
this.Style.ForeColor.Color = RGB(""); this.Style.BorderColor.Color = RGB("b7b7b7");
this.Style.BackColor1.Color = RGB("ffffff");
this.Style.BackColor2.Color = RGB("ededed"); this.StyleMouseOver.BackColor1.Color = RGB("ffffff");
this.StyleMouseOver.BackColor2.Color = RGB("dcdcdc"); this.StyleMouseDown.BackColor1.Color = RGB("ededed");
this.StyleMouseDown.BackColor2.Color = RGB("ffffff");
break;
case ColorStyles.orange:
this.Style.ForeColor.Color = RGB("fef4e9"); this.Style.BorderColor.Color = RGB("da7c0c");
this.Style.BackColor1.Color = RGB("faa51a");
this.Style.BackColor2.Color = RGB("f47a20"); this.StyleMouseOver.BackColor1.Color = RGB("f88e11");
this.StyleMouseOver.BackColor2.Color = RGB("f06015"); this.StyleMouseDown.BackColor1.Color = RGB("f47a20");
this.StyleMouseDown.BackColor2.Color = RGB("faa51a");
break;
case ColorStyles.red:
this.Style.ForeColor.Color = RGB("faddde");
this.Style.BorderColor.Color = RGB("980c10");
this.Style.BackColor1.Color = RGB("ed1c24");
this.Style.BackColor2.Color = RGB("aa1317");
this.StyleMouseOver.BackColor1.Color = RGB("c9151b");
this.StyleMouseOver.BackColor2.Color = RGB("a11115");
this.StyleMouseDown.BackColor1.Color = RGB("aa1317");
this.StyleMouseDown.BackColor2.Color = RGB("ed1c24");
break;
case ColorStyles.blue:
this.Style.ForeColor.Color = RGB("d9eef7");
this.Style.BorderColor.Color = RGB("0076a3");
this.Style.BackColor1.Color = RGB("00adee");
this.Style.BackColor2.Color = RGB("0078a5");
this.StyleMouseOver.BackColor1.Color = RGB("0095cc");
this.StyleMouseOver.BackColor2.Color = RGB("00678e");
this.StyleMouseDown.BackColor1.Color = RGB("0078a5");
this.StyleMouseDown.BackColor2.Color = RGB("00adee");
break;
case ColorStyles.rosy:
this.Style.ForeColor.Color = RGB("fae7e9"); this.Style.BorderColor.Color = RGB("b73948");
this.Style.BackColor1.Color = RGB("f16c7c");
this.Style.BackColor2.Color = RGB("bf404f"); this.StyleMouseOver.BackColor1.Color = RGB("cf5d6a");
this.StyleMouseOver.BackColor2.Color = RGB("a53845"); this.StyleMouseDown.BackColor1.Color = RGB("bf404f");
this.StyleMouseDown.BackColor2.Color = RGB("f16c7c");
break;
case ColorStyles.green:
this.Style.ForeColor.Color = RGB("e8f0de"); this.Style.BorderColor.Color = RGB("");
this.Style.BackColor1.Color = RGB("7db72f");
this.Style.BackColor2.Color = RGB("4e7d0e"); this.StyleMouseOver.BackColor1.Color = RGB("6b9d28");
this.StyleMouseOver.BackColor2.Color = RGB("436b0c"); this.StyleMouseDown.BackColor1.Color = RGB("4e7d0e");
this.StyleMouseDown.BackColor2.Color = RGB("7db72f");
break;
case ColorStyles.pink:
this.Style.ForeColor.Color = RGB("feeef5"); this.Style.BorderColor.Color = RGB("d2729e");
this.Style.BackColor1.Color = RGB("feb1d3");
this.Style.BackColor2.Color = RGB("f171ab"); this.StyleMouseOver.BackColor1.Color = RGB("f4aacb");
this.StyleMouseOver.BackColor2.Color = RGB("e86ca4"); this.StyleMouseDown.BackColor1.Color = RGB("f171ab");
this.StyleMouseDown.BackColor2.Color = RGB("feb1d3");
break;
}
}
}

用DotNetBar设计的 Gradient Buttons 漂亮按钮的更多相关文章

  1. 设计可以多选的按钮ChooseManyButton

    设计可以多选的按钮ChooseManyButton 效果: 源码: ChooseManyButton.h 与 ChooseManyButton.m // // ChooseManyButton.h / ...

  2. 国外经典设计:12个漂亮的移动APP网站案例

    优秀的移动应用程序网站是设计灵感的重要来源.从美丽的图像,合理的使用空白到排版和颜色的使用,似乎设计师都加倍努力以创造一些美好和独特的设计来推广自己的应用程序. 因此,在这篇文章中,我们已经聚集了13 ...

  3. 界面设计中如何增强CTA按钮召唤力?

    以下内容由Mockplus(摹客)团队翻译整理,仅供学习交流,Mockplus是更快更简单的原型设计工具. 网页和软件应用之类数字产品的有效交互系统一般是由拥有各种任务和功能的小元素构成.而为创建更加 ...

  4. FancyButtons一个漂亮按钮的库

      一个功能强大且全面的按钮控件,是目前我见过的最好使的按钮. 支持给按钮添加图标,并且可通过属性设置手指按钮的效果,不需要在写<selector>文件. 项目地址:https://git ...

  5. 有关DotNetBar设计样式和运行时的样式不一致的问题

    可以在 窗体类构造函数的InitializeComponent后加上下面圈出的内容:  this.EnableGlass = false; 参考文章 DotNetBar如何控制窗体样式

  6. 分享一个漂亮按钮插件FancyButtons

    一转眼,2018年的第10天就这样过去了.回看17年,曾经做了些啥都忘记了,就像每一天写日志时的样子(双手放在键盘上,怒着嘴,抬着头,望着天花板), 然后突然记得好像好久没有写随笔了(@_@).自从配 ...

  7. PS网页设计教程XXIV——从头设计一个漂亮的网站

    作为编码者,美工基础是偏弱的.我们可以参考一些成熟的网页PS教程,提高自身的设计能力.套用一句话,“熟读唐诗三百首,不会作诗也会吟”. 本系列的教程来源于网上的PS教程,都是国外的,全英文的.本人尝试 ...

  8. [UWP]浅谈按钮设计

    一时兴起想谈谈UWP按钮的设计. 按钮是UI中最重要的元素之一,可能也是用得最多的交互元素.好的按钮设计可以有效提高用户体验,构造让人眼前一亮的UI.而且按钮通常不会影响布局,小小的按钮无论怎么改也不 ...

  9. 很漂亮的按钮css样式(没有用到图片,可直接拷贝代码使用)

    [转自]http://blog.csdn.net/lushuaiyin/article/details/8118669 对于程序员,有时候也需要对页面风格做些改动,整体的页面风格还是美工的工作. 按钮 ...

随机推荐

  1. 安装mongodb

    安装mongodb的时候遇到一些麻烦 首先将安装包下下来 安装的是windows版本的 将bin文件夹加入环境变量后通过mongod和mongo指令就可以进行操作,很方便 用指令mongod --db ...

  2. Less基础知识~~~实现css

    首先献上我学习网址 http://www.bootcss.com/lesscss.html 就是通过less.js的调用,更好的实现css样式布局,更简易化. 最近看前端的职位要求需简单理解less之 ...

  3. NSComparisonResul、NSNotFound、NSEnumerationOptions......的用处

    NSNotFound 定义一个值,用于指示请求项找不到或不存在.Defines a value that indicates that an item requested couldn’t be fo ...

  4. Windows Store App 偏移特效

    通过前面讲解的内容,读者已经了解了如何在三维空间中使旋转对象绕指定的旋转中心旋转一定的角度.接下来在这个基础上进一步讲解如何对旋转对象进行平移.下面首先介绍一下用到的几个属性. q  LocalOff ...

  5. McAfee重返科技业 研制D-Central防政府监视

    新闻链接:http://tech.qq.com/a/20131008/016127.htm 新闻时间: 10月8日编译 新闻正文:McAfee重返科技业 研制D-Central防政府监视 约翰·迈克菲 ...

  6. (zz) 谷歌技术"三宝"之BigTable

    006年的OSDI有两篇google的论文,分别是BigTable和Chubby.Chubby是一个分布式锁服务,基于Paxos算法:BigTable是一个用于管理结构化数据的分布式存储系统,构建在G ...

  7. Activity之间数据传递(一)(简单传递,数据包Bundle,传递对象)

    一,简单传递(简单的字符串) 第一个activity通过putExtra()将字符串传入i protected void onCreate(Bundle savedInstanceState) { s ...

  8. node.js学习笔记【1】

    http://howtonode.org/how-to-install-nodejs http://www.mcclean-cooper.com/valentino/cygwin_install/

  9. JQuery正则验证

    比较常用的: function checkIshanzi(s) { //var patrn = /^[\u2E80-\u9FFF]$/; //Unicode编码中的汉字范围 /[^\x00-\x80] ...

  10. Boundaries

    Using Third-Party Code There is a natural tension between the provider of an interface and the user ...