本文整理汇总了C#中DevComponents.DotNetBar.Rendering.ColorFactory.GetColor方法的典型用法代码示例。如果您正苦于以下问题:C# ColorFactory.GetColor方法的具体用法?C# ColorFactory.GetColor怎么用?C# ColorFactory.GetColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DevComponents.DotNetBar.Rendering.ColorFactory
的用法示例。
在下文中一共展示了ColorFactory.GetColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}