本文整理汇总了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;未经允许,请勿转载。 |
请发表评论