• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Rendering.ColorFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DevComponents.DotNetBar.Rendering.ColorFactory的典型用法代码示例。如果您正苦于以下问题:C# ColorFactory类的具体用法?C# ColorFactory怎么用?C# ColorFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ColorFactory类属于DevComponents.DotNetBar.Rendering命名空间,在下文中一共展示了ColorFactory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateStyle

        /// <summary>
        /// Create the DefaultVisualStyle for SuperGridControl.
        /// </summary>
        /// <param name="factory">Color-Factory used to generate colors.</param>
        /// <returns>New instance of DefaultVisualStyles class.</returns>s
        public override DefaultVisualStyles CreateStyle(ColorFactory factory)
        {
            DefaultVisualStyles visualStyle = new DefaultVisualStyles();

            InitGridPanelStyle(visualStyle, factory);

            InitCellStyles(visualStyle, factory);
            InitAltRowCellStyles(visualStyle, factory);

            InitColumnStyles(visualStyle, factory);
            InitAltColumnStyles(visualStyle, factory);
            InitColumnHeaderStyles(visualStyle, factory);

            InitRowStyles(visualStyle, factory);
            InitTextRowStyles(visualStyle, factory);

            InitGroupHeaderStyles(visualStyle, factory);

            InitFilterRowStyles(visualStyle, factory);
            InitFilterColumnHeaderStyles(visualStyle, factory);

            InitGroupByStyles(visualStyle, factory);

            return (visualStyle);
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:30,代码来源:Office2010BlackStyleFactory.cs


示例2: InitGridPanelStyle

        private void InitGridPanelStyle(DefaultVisualStyles visualStyle, ColorFactory factory)
        {
            GridPanelVisualStyle style = new GridPanelVisualStyle();

            style.Background = new Background(factory.GetColor(0xFFFFFF));
            style.BorderColor = new BorderColor(factory.GetColor(0x313131));
            style.BorderPattern.All = LinePattern.Solid;
            style.BorderThickness = new Thickness(1);
            style.TextColor = factory.GetColor(0x000000);

            style.TreeLineColor = factory.GetColor(0x484848);
            style.HeaderLineColor = factory.GetColor(0x444444);
            style.HorizontalLineColor = factory.GetColor(0xDADCDD);
            style.VerticalLineColor = factory.GetColor(0xDADCDD);

            style.TreeLinePattern = LinePattern.Solid;
            style.HorizontalLinePattern = LinePattern.Solid;
            style.VerticalLinePattern = LinePattern.Solid;
            style.HeaderHLinePattern = LinePattern.Solid;
            style.HeaderVLinePattern = LinePattern.Solid;

            BaseTreeButtonVisualStyle tstyle = new BaseTreeButtonVisualStyle();

            tstyle.BorderColor = factory.GetColor(Color.SlateGray);
            tstyle.HotBorderColor = factory.GetColor(Color.SlateGray);
            tstyle.LineColor = factory.GetColor(Color.DarkSlateGray);
            tstyle.HotLineColor = factory.GetColor(Color.DarkSlateGray);
            tstyle.Background = new Background(factory.GetColor(Color.White), factory.GetColor(Color.Gainsboro), 90);
            tstyle.HotBackground = new Background(factory.GetColor(Color.White), factory.GetColor(Color.Gainsboro), 90);

            style.CircleTreeButtonStyle.CollapseButton = tstyle;
            style.CircleTreeButtonStyle.ExpandButton = tstyle;

            style.SquareTreeButtonStyle.CollapseButton = tstyle;
            style.SquareTreeButtonStyle.ExpandButton = tstyle;

            tstyle = new BaseTreeButtonVisualStyle();

            tstyle.BorderColor = factory.GetColor(Color.Black);
            tstyle.HotBorderColor = factory.GetColor(0x27C7F7);
            tstyle.Background = new Background(factory.GetColor(Color.Black));
            tstyle.HotBackground = new Background(factory.GetColor(0xC7EBFA));

            style.TriangleTreeButtonStyle.CollapseButton = tstyle;

            tstyle = new BaseTreeButtonVisualStyle();

            tstyle.BorderColor = factory.GetColor(Color.DimGray);
            tstyle.HotBorderColor = factory.GetColor(0x27C7F7);
            tstyle.Background = new Background(factory.GetColor(Color.White));
            tstyle.HotBackground = new Background(factory.GetColor(0xC7EBFA));

            style.TriangleTreeButtonStyle.ExpandButton = tstyle;

            visualStyle.GridPanelStyle = style;
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:56,代码来源:Office2010BlackStyleFactory.cs


示例3: InitGridPanelStyle

        private void InitGridPanelStyle(DefaultVisualStyles visualStyle, ColorFactory factory)
        {
            GridPanelVisualStyle style = new GridPanelVisualStyle();

            MetroPartColors metroColors = _MetroPartColors;
            style.Background = new Background(factory.GetColor(metroColors.CanvasColor));
            style.BorderColor = new BorderColor(factory.GetColor(metroColors.CanvasColorDarkShade));
            style.BorderPattern.All = LinePattern.Solid;
            style.BorderThickness = new Thickness(1);
            style.TextColor = factory.GetColor(metroColors.TextColor);

            style.TreeLineColor = factory.GetColor(metroColors.CanvasColorLighterShade);
            style.HeaderLineColor = factory.GetColor(metroColors.CanvasColorDarkShade);
            style.HorizontalLineColor = factory.GetColor(metroColors.CanvasColorLighterShade);
            style.VerticalLineColor = factory.GetColor(metroColors.CanvasColorLighterShade);

            style.TreeLinePattern = LinePattern.Solid;
            style.HorizontalLinePattern = LinePattern.Solid;
            style.VerticalLinePattern = LinePattern.Solid;
            style.HeaderHLinePattern = LinePattern.Solid;
            style.HeaderVLinePattern = LinePattern.Solid;

            BaseTreeButtonVisualStyle tstyle = new BaseTreeButtonVisualStyle();

            tstyle.BorderColor = factory.GetColor(metroColors.CanvasColorLighterShade);
            tstyle.HotBorderColor = factory.GetColor(metroColors.CanvasColorLighterShade);
            tstyle.LineColor = factory.GetColor(metroColors.CanvasColorDarkShade);
            tstyle.HotLineColor = factory.GetColor(metroColors.CanvasColorDarkShade);
            tstyle.Background = new Background(factory.GetColor(metroColors.CanvasColor), factory.GetColor(metroColors.CanvasColorDarkShade), 90);
            tstyle.HotBackground = new Background(factory.GetColor(metroColors.CanvasColor), factory.GetColor(metroColors.CanvasColorDarkShade), 90);

            style.CircleTreeButtonStyle.CollapseButton = tstyle;
            style.CircleTreeButtonStyle.ExpandButton = tstyle;

            style.SquareTreeButtonStyle.CollapseButton = tstyle;
            style.SquareTreeButtonStyle.ExpandButton = tstyle;

            style.TriangleTreeButtonStyle.CollapseButton = tstyle;
            style.TriangleTreeButtonStyle.ExpandButton = tstyle;

            style.TriangleTreeButtonStyle.ExpandButton = tstyle;
            visualStyle.GridPanelStyle = style;
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:43,代码来源:MetroStyleFactory.cs



注:本文中的DevComponents.DotNetBar.Rendering.ColorFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SuperGrid.GridColumn类代码示例发布时间:2022-05-24
下一篇:
C# DotNetBar.ItemPaintArgs类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap