点击回首页
我的浏览记录 | | 帮助?
当前位置:
首页>> 企业应用>> Winform 自定义换肤界面OA管理系统源码>> 源文件浏览
[商业版 150金币] WinForm,下载次数:3 次 | 关键字: 皮肤 控件 oa

源码截图

源码目录树

当前路径:Cool.Windows.Forms/CoolMenuTreeView_Bak.cs     using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Cool.Windows.Forms
{
    public class CoolMenuTreeView_Bak : TreeView
    {
        public CoolMenuTreeView_Bak()
        {
            this.SetStyle(
                     //ControlStyles.UserPaint |//使用自定义的绘制方式
                     ControlStyles.ResizeRedraw//当控件大小发生变化时就重新绘制
                    | ControlStyles.SupportsTransparentBackColor//则控件接受 alpha 组件数小于 255 个的 BackColor 来模拟透明度
                    | ControlStyles.AllPaintingInWmPaint//则控件忽略窗口消息 WM_ERASEBKGND 以减少闪烁
                    | ControlStyles.OptimizedDoubleBuffer//则控件将首先绘制到缓冲区而不是直接绘制到屏幕,这可以减少闪烁
                    , true);

            this.FullRowSelect = true;
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.DrawMode = TreeViewDrawMode.OwnerDrawAll;
            this.ItemHeight = 45;
            this.ShowLines = false;
        }

        #region //field & property
        /// <summary>
        /// 展开按扭的大小
        /// </summary>
        private Size ExpandButtonSize = new Size(16, 16);
        private Color _ExpandButtonColor = Color.FromArgb(255, 255, 255);
        /// <summary>
        /// 展开按扭颜色
        /// </summary>
        [Description("展开按扭颜色"), Category("XOProperty")]
        public Color ExpandButtonColor
        {
            get
            {
                return _ExpandButtonColor;
            }
            set
            {
                if (_ExpandButtonColor != value)
                {
                    _ExpandButtonColor = value;
                    this.Invalidate();
                }
            }
        }
        private Color _GroupBgColor = Color.FromArgb(95, 162, 211);
        /// <summary>
        /// 分组栏背景色
        /// </summary>
        [Description("分组栏背景色"), Category("XOProperty")]
        public Color GroupBgColor
        {
            get
            {
                return _GroupBgColor;
            }
            set
            {
                if (_GroupBgColor != value)
                {
                    _GroupBgColor = value;
                    this.Invalidate();

                }
            }
        }
        private Color _GroupTitleColor = Color.FromArgb(0, 0, 0);
        /// <summary>
        /// 分组栏标题色
        /// </summary>
        [Description("分组栏标题色"), Category("XOProperty")]
        public Color GroupTitleColor
        {
            get
            {
                return _GroupTitleColor;
            }
            set
            {
                if (_GroupTitleColor != value)
                {
                    _GroupTitleColor = value;
                    this.Invalidate();
                }
            }
        }
        private Color _OverForeColor = Color.DeepSkyBlue;
        /// <summary>
        /// 鼠标悬停色
        /// </summary>
        [Description("鼠标悬停色"), Category("XOProperty")]
        public Color OverForeColor
        {
            get
            {
                return _OverForeColor;
            }
            set
            {
                if (_OverForeColor != value)
                {
                    _OverForeColor = value;
                    this.Invalidate();
                }
            }
        }
        /// <summary>
        /// 节点高度
        /// </summary>
        public...
完整源码文件,请先购买后再查看
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途)
地址:北京市海淀区大恒科技大厦五层 邮编:100080
Floor 5th,Daheng Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2015. 京ICP备09089570号 | 京公网安备11010702000869号
分享该页面
关闭侧边栏