/// <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); }
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; }
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; }
private void InitTextRowStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { TextRowVisualStyle style = new TextRowVisualStyle(); MetroPartColors metroColors = _MetroPartColors; style.Alignment = Alignment.MiddleCenter; style.AllowWrap = Tbool.True; style.Background = new Background(factory.GetColor(metroColors.CanvasColor)); style.BorderColor = new BorderColor(factory.GetColor(metroColors.CanvasColorLighterShade)); style.Padding.All = 2; style.TextColor = factory.GetColor(metroColors.TextColor); style.RowHeaderStyle.Background = new Background(factory.GetColor(metroColors.CanvasColorLighterShade)); style.RowHeaderStyle.BorderHighlightColor = GetBorderHighlight(); visualStyle.TitleStyles[StyleType.Default] = style; visualStyle.HeaderStyles[StyleType.Default] = style.Copy(); visualStyle.FooterStyles[StyleType.Default] = style.Copy(); style = style.Copy(); style.Background = new Background(Color.Transparent); visualStyle.CaptionStyles[StyleType.Default] = style; }
private void UpdateGridStyle() { SuperGridStyle style = SuperGridStyle.Office2010Blue; switch (StyleManager.Style) { case eStyle.Office2007VistaGlass: case eStyle.VisualStudio2010Blue: case eStyle.Windows7Blue: case eStyle.Office2007Blue: case eStyle.Office2010Blue: style = SuperGridStyle.Office2010Blue; break; case eStyle.Office2007Black: case eStyle.Office2010Black: style = SuperGridStyle.Office2010Black; break; case eStyle.Office2007Silver: case eStyle.Office2010Silver: style = SuperGridStyle.Office2010Silver; break; case eStyle.Metro: style = SuperGridStyle.Metro; break; } _BaseVisualStyles = VisualStylesTable.GetStyle(style); if (IsHandleCreated == true) { UpdateStyleCount(); Invalidate(true); } }
private void InitFilterRowStyles( DefaultVisualStyles visualStyle, ColorFactory factory) { FilterRowVisualStyle style = new FilterRowVisualStyle(); style.FilterBorderColor = GetBorderHighlight(factory); style.FilterBackground = new Background(Color.White, factory.GetColor(Color.LightGray), 0); style.WhiteSpaceBackground = new Background(factory.GetColor(0x797979)); style.RowHeader.Background = new Background(factory.GetColor(0x6A6A6A), factory.GetColor(0x595959), BackFillType.ForwardDiagonal); style.RowHeader.BorderHighlightColor = GetBorderHighlight(factory); visualStyle.FilterRowStyles[StyleType.Default] = style; style = style.Copy(); style.FilterBackground = new Background(Color.White, factory.GetColor(Color.Green), 45); visualStyle.FilterRowStyles[StyleType.Selected] = style; style = style.Copy(); style.FilterBackground = new Background(Color.White, factory.GetColor(0xE2AA00), 0); style.RowHeader.Background = new Background(factory.GetColor(0x8E8E8E)); visualStyle.FilterRowStyles[StyleType.MouseOver] = style; visualStyle.FilterRowStyles[StyleType.SelectedMouseOver] = style; }
private RowVisualStyle GetSelectedMouseOverRowStyle(DefaultVisualStyles visualStyle, ColorFactory factory) { RowVisualStyle rowStyle = new RowVisualStyle(); rowStyle.Background = GetDefaultSelectedBackground(factory); RowHeaderVisualStyle style = new RowHeaderVisualStyle(); style.Background = new Background(factory.GetColor(0xBABABA)); style.ActiveRowBackground = new Background(factory.GetColor(0xBABABA)); style.TextColor = factory.GetColor(0x444444); rowStyle.RowHeaderStyle = style; visualStyle.RowStyles[StyleType.Selected] = rowStyle; rowStyle = new RowVisualStyle(); rowStyle.Background = GetSelectedColumnMouseOverBackground(factory); style = new RowHeaderVisualStyle(); style.Background = new Background(factory.GetColor(0xFFEB91)); style.ActiveRowBackground = new Background(factory.GetColor(0xB7DBFF)); rowStyle.RowHeaderStyle = style; return (rowStyle); }
private void InitAltColumnStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { visualStyle.AlternateColumnCellStyles[StyleType.Default].Background = new Background(factory.GetColor(0xEAF2FB)); }
private void InitAltRowCellStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { visualStyle.AlternateRowCellStyles[StyleType.Default].Background = new Background(factory.GetColor(0xF4F4F4)); }
private void InitFilterRowStyles( DefaultVisualStyles visualStyle, ColorFactory factory) { FilterRowVisualStyle style = new FilterRowVisualStyle(); MetroPartColors metroColors = _MetroPartColors; style.FilterBorderColor = factory.GetColor(0x787D87); style.FilterBackground = new Background( Color.White, factory.GetColor(metroColors.CanvasColorDarkShade), 0); style.WhiteSpaceBackground = new Background(factory.GetColor(metroColors.CanvasColor)); style.RowHeader.Background = new Background(factory.GetColor(metroColors.CanvasColorLighterShade)); style.RowHeader.BorderHighlightColor = GetBorderHighlight(); visualStyle.FilterRowStyles[StyleType.Default] = style; style = style.Copy(); style.FilterBackground = new Background( Color.White, factory.GetColor(metroColors.ComplementColor), 45); visualStyle.FilterRowStyles[StyleType.Selected] = style; style = style.Copy(); style.FilterBackground = new Background( Color.White, factory.GetColor(metroColors.BaseColorDark), 0); style.RowHeader.Background = new Background(factory.GetColor(metroColors.CanvasColorLightShade)); visualStyle.FilterRowStyles[StyleType.MouseOver] = style; visualStyle.FilterRowStyles[StyleType.SelectedMouseOver] = style; }
private void InitFilterColumnHeaderStyles( DefaultVisualStyles visualStyle, ColorFactory factory) { FilterColumnHeaderVisualStyle colStyle = new FilterColumnHeaderVisualStyle(); MetroPartColors metroColors = _MetroPartColors; colStyle.Alignment = Alignment.MiddleCenter; colStyle.Font = SystemFonts.CaptionFont; colStyle.TextColor = factory.GetColor(metroColors.TextColor); colStyle.ErrorTextColor = factory.GetColor(metroColors.BaseColorDarker); colStyle.Background = new Background(factory.GetColor(metroColors.CanvasColorLighterShade)); colStyle.GripBarBackground = new Background(factory.GetColor(metroColors.CanvasColor)); visualStyle.FilterColumnHeaderStyles[StyleType.Default] = colStyle; colStyle = new FilterColumnHeaderVisualStyle(); colStyle.Background = new Background(factory.GetColor(metroColors.CanvasColorLightShade)); visualStyle.FilterColumnHeaderStyles[StyleType.MouseOver] = colStyle; colStyle = new FilterColumnHeaderVisualStyle(); colStyle.Background = GetDefaultSelectedColumnBackground(factory); visualStyle.FilterColumnHeaderStyles[StyleType.Selected] = colStyle; colStyle = new FilterColumnHeaderVisualStyle(); colStyle.Background = GetSelectedColumnMouseOverBackground(); visualStyle.FilterColumnHeaderStyles[StyleType.SelectedMouseOver] = colStyle; }
private void InitGroupHeaderStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { MetroPartColors metroColors = _MetroPartColors; GroupHeaderVisualStyle style = new GroupHeaderVisualStyle(); style.AllowWrap = Tbool.True; style.Alignment = Alignment.MiddleLeft; style.Font = SystemFonts.DefaultFont; style.Background = new Background(factory.GetColor(metroColors.CanvasColor)); style.UnderlineColor = factory.GetColor(metroColors.ComplementColor); style.RowHeaderStyle.Background = new Background(factory.GetColor(metroColors.CanvasColorLighterShade)); style.RowHeaderStyle.BorderHighlightColor = GetBorderHighlight(); style.RowHeaderStyle.Font = SystemFonts.DefaultFont; style.TextColor = metroColors.TextColor; visualStyle.GroupHeaderStyles[StyleType.Default] = style; }
private RowVisualStyle GetSelectedMouseOverRowStyle(DefaultVisualStyles visualStyle, ColorFactory factory) { MetroPartColors metroColors = _MetroPartColors; RowVisualStyle rowStyle = new RowVisualStyle(); rowStyle.Background = GetDefaultSelectedBackground(factory); RowHeaderVisualStyle style = new RowHeaderVisualStyle(); style.Background = new Background(metroColors.BaseColor); style.ActiveRowBackground = new Background(metroColors.BaseColor); rowStyle.RowHeaderStyle = style; visualStyle.RowStyles[StyleType.Selected] = rowStyle; rowStyle = new RowVisualStyle(); rowStyle.Background = GetSelectedColumnMouseOverBackground(); style = new RowHeaderVisualStyle(); style.Background = new Background(metroColors.BaseColor); style.ActiveRowBackground = new Background(metroColors.BaseColor); rowStyle.RowHeaderStyle = style; return (rowStyle); }
private void InitAltColumnStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { MetroPartColors metroColors = _MetroPartColors; visualStyle.AlternateColumnCellStyles[StyleType.Default].Background = new Background(factory.GetColor(metroColors.CanvasColor)); }
private void InitColumnStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { ColumnHeaderVisualStyle colStyle = new ColumnHeaderVisualStyle(); MetroPartColors metroColors = _MetroPartColors; colStyle.Alignment = Alignment.MiddleCenter; colStyle.BorderColor = new BorderColor(factory.GetColor(metroColors.CanvasColorLightShade)); colStyle.BorderPattern.All = LinePattern.Solid; colStyle.BorderThickness.All = 0; colStyle.Font = SystemFonts.CaptionFont; colStyle.ImageAlignment = Alignment.MiddleLeft; colStyle.Margin.All = 0; colStyle.ImageOverlay = ImageOverlay.None; colStyle.TextColor = factory.GetColor(metroColors.TextColor); colStyle.Background = new Background(factory.GetColor(metroColors.CanvasColorLighterShade)); visualStyle.ColumnHeaderStyles[StyleType.Default] = colStyle; visualStyle.ColumnHeaderStyles[StyleType.ReadOnly] = colStyle.Copy(); visualStyle.ColumnHeaderStyles[StyleType.ReadOnly].Font = null; colStyle = new ColumnHeaderVisualStyle(); colStyle.Background = new Background(factory.GetColor(metroColors.CanvasColorLightShade)); visualStyle.ColumnHeaderStyles[StyleType.MouseOver] = colStyle; visualStyle.ColumnHeaderStyles[StyleType.ReadOnlyMouseOver] = colStyle.Copy(); colStyle = new ColumnHeaderVisualStyle(); colStyle.Background = GetDefaultSelectedColumnBackground(factory); visualStyle.ColumnHeaderStyles[StyleType.Selected] = colStyle; visualStyle.ColumnHeaderStyles[StyleType.ReadOnlySelected] = colStyle.Copy(); colStyle = new ColumnHeaderVisualStyle(); colStyle.Background = GetSelectedColumnMouseOverBackground(); visualStyle.ColumnHeaderStyles[StyleType.SelectedMouseOver] = colStyle; visualStyle.ColumnHeaderStyles[StyleType.ReadOnlySelectedMouseOver] = colStyle.Copy(); }
private void InitCellStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { CellVisualStyle style = new CellVisualStyle(); MetroPartColors metroColors = _MetroPartColors; style.Alignment = Alignment.MiddleLeft; style.Background = new Background(factory.GetColor(metroColors.CanvasColor)); style.BorderColor = new BorderColor(factory.GetColor(metroColors.CanvasColorLighterShade)); style.BorderPattern.All = LinePattern.Solid; style.BorderThickness.All = 0; style.Font = SystemFonts.DefaultFont; style.ImageAlignment = Alignment.MiddleLeft; style.ImagePadding.All = 2; style.Margin.All = 0; style.ImageOverlay = ImageOverlay.None; style.Padding.All = 0; style.TextColor = metroColors.TextColor; visualStyle.CellStyles[StyleType.Default] = style; style = new CellVisualStyle(); style.TextColor = metroColors.CanvasColorDarkShade; visualStyle.CellStyles[StyleType.ReadOnly] = style; style = new CellVisualStyle(); style.Background = GetDefaultSelectedBackground(factory); style.TextColor = factory.GetColor(metroColors.BaseTextColor); visualStyle.CellStyles[StyleType.Selected] = style; visualStyle.CellStyles[StyleType.ReadOnlySelected] = style.Copy(); style = new CellVisualStyle(); style.Background = GetSelectedMouseOverBackground(factory); style.TextColor = factory.GetColor(metroColors.BaseColorLightText); visualStyle.CellStyles[StyleType.SelectedMouseOver] = style; visualStyle.CellStyles[StyleType.ReadOnlySelectedMouseOver] = style.Copy(); style = new CellVisualStyle(); style.Background = new Background(factory.GetColor(metroColors.CanvasColor)); visualStyle.CellStyles[StyleType.Empty] = style; }
private void InitCellStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { CellVisualStyle style = new CellVisualStyle(); style.Alignment = Alignment.MiddleLeft; style.Background = new Background(factory.GetColor(Color.White)); //style.BorderColor = new BorderColor(factory.GetColor(0xDADCDD)); //style.BorderPattern.All = LinePattern.Solid; //style.BorderThickness.All = 0; style.Font = SystemFonts.DefaultFont; style.ImageAlignment = Alignment.MiddleLeft; style.ImagePadding.All = 2; style.Margin.All = 0; style.ImageOverlay = ImageOverlay.None; style.Padding.All = 0; style.TextColor = Color.Black; visualStyle.CellStyles[StyleType.Default] = style; //visualStyle.CellStyles[StyleType.ReadOnly] = style.Copy(); //visualStyle.CellStyles[StyleType.MouseOver] = style.Copy(); //visualStyle.CellStyles[StyleType.ReadOnlyMouseOver] = style.Copy(); style = new CellVisualStyle(); style.Background = GetDefaultSelectedBackground(factory); visualStyle.CellStyles[StyleType.Selected] = style; //visualStyle.CellStyles[StyleType.ReadOnlySelected] = style.Copy(); style = new CellVisualStyle(); style.Background = GetSelectedMouseOverBackground(factory); visualStyle.CellStyles[StyleType.SelectedMouseOver] = style; //visualStyle.CellStyles[StyleType.ReadOnlySelectedMouseOver] = style.Copy(); style = new CellVisualStyle(); style.Background = new Background(factory.GetColor(0xF4F4F4)); visualStyle.CellStyles[StyleType.Empty] = style; }
private void InitGroupByStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { GroupByVisualStyle style = new GroupByVisualStyle(); MetroPartColors metroColors = _MetroPartColors; style.Alignment = Alignment.MiddleCenter; style.GroupBoxConnectorColor = factory.GetColor(metroColors.BaseColorDark); // Panel border color style.GroupBoxBorderColor = factory.GetColor(metroColors.BaseColorDark); style.InsertMarkerBorderColor = factory.GetColor(metroColors.BaseColorDark); style.InsertMarkerBackground = GetSelectedColumnMouseOverBackground(); style.RowHeaderStyle.Background = new Background(factory.GetColor(metroColors.CanvasColorLighterShade)); style.RowHeaderStyle.BorderHighlightColor = GetBorderHighlight(); style.TextColor = factory.GetColor(0x363636); // Col text color style.GroupBoxBackground = new Background(factory.GetColor(metroColors.CanvasColorLighterShade)); // col background visualStyle.GroupByStyles[StyleType.Default] = style; style = new GroupByVisualStyle(); style.GroupBoxBackground = new Background(factory.GetColor(metroColors.CanvasColorLightShade)); // col background visualStyle.GroupByStyles[StyleType.MouseOver] = style; style = new GroupByVisualStyle(); style.GroupBoxBackground = GetDefaultSelectedColumnBackground(factory); // col background visualStyle.GroupByStyles[StyleType.Selected] = style; style = new GroupByVisualStyle(); style.GroupBoxBackground = GetSelectedColumnMouseOverBackground(); // col background visualStyle.GroupByStyles[StyleType.SelectedMouseOver] = style; }
private void InitColumnStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { ColumnHeaderVisualStyle colStyle = new ColumnHeaderVisualStyle(); colStyle.Alignment = Alignment.MiddleCenter; colStyle.Font = SystemFonts.CaptionFont; colStyle.ImageAlignment = Alignment.MiddleLeft; colStyle.Margin.All = 0; colStyle.ImageOverlay = ImageOverlay.None; colStyle.TextColor = factory.GetColor(0xE2E2E2); colStyle.Background = new Background(factory.GetColor(0x6A6A6A)); visualStyle.ColumnHeaderStyles[StyleType.Default] = colStyle; colStyle = new ColumnHeaderVisualStyle(); colStyle.Background = new Background(factory.GetColor(0xFFDF6B), factory.GetColor(0xFFFCE6)); colStyle.TextColor = factory.GetColor(0x444444); visualStyle.ColumnHeaderStyles[StyleType.MouseOver] = colStyle; colStyle = new ColumnHeaderVisualStyle(); colStyle.Background = GetDefaultSelectedColumnBackground(factory); colStyle.TextColor = factory.GetColor(0x444444); visualStyle.ColumnHeaderStyles[StyleType.Selected] = colStyle; colStyle = new ColumnHeaderVisualStyle(); colStyle.Background = GetSelectedColumnMouseOverBackground(factory); colStyle.TextColor = factory.GetColor(0x444444); visualStyle.ColumnHeaderStyles[StyleType.SelectedMouseOver] = colStyle; }
private void InitTextRowStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { TextRowVisualStyle style = new TextRowVisualStyle(); style.Alignment = Alignment.MiddleCenter; style.AllowWrap = Tbool.True; style.Background = new Background(factory.GetColor(0xEFF5FB), factory.GetColor(0xE2ECFA), BackFillType.Angle); style.BorderColor = new BorderColor(factory.GetColor(0x849DBD)); style.Padding.All = 2; style.TextColor = factory.GetColor(0x1E395B); style.RowHeaderStyle.Background = new Background(factory.GetColor(0xEFF5FB), factory.GetColor(0xE2ECFA), BackFillType.Angle); style.RowHeaderStyle.BorderHighlightColor = GetBorderHighlight(factory); visualStyle.TitleStyles[StyleType.Default] = style; visualStyle.HeaderStyles[StyleType.Default] = style.Copy(); visualStyle.FooterStyles[StyleType.Default] = style.Copy(); style = style.Copy(); style.Background = new Background(Color.Transparent); visualStyle.CaptionStyles[StyleType.Default] = style; }
private void InitRowStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { visualStyle.RowStyles[StyleType.Default] = GetDefaultRowStyle(factory); visualStyle.RowStyles[StyleType.MouseOver] = GetMouseOverRowStyle(factory); visualStyle.RowStyles[StyleType.SelectedMouseOver] = GetSelectedMouseOverRowStyle(visualStyle, factory); }
private void InitColumnStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { ColumnHeaderVisualStyle colStyle = new ColumnHeaderVisualStyle(); colStyle.Alignment = Alignment.MiddleCenter; colStyle.BorderColor = new BorderColor(factory.GetColor(0xA0B0C7)); colStyle.BorderPattern.All = LinePattern.Solid; colStyle.BorderThickness.All = 0; colStyle.Font = SystemFonts.CaptionFont; colStyle.ImageAlignment = Alignment.MiddleLeft; colStyle.Margin.All = 0; colStyle.ImageOverlay = ImageOverlay.None; colStyle.TextColor = Color.Black; colStyle.Background = new Background(factory.GetColor(0xEFF4FB), factory.GetColor(0xE1ECFA)); visualStyle.ColumnHeaderStyles[StyleType.Default] = colStyle; colStyle = new ColumnHeaderVisualStyle(); colStyle.Background = new Background(factory.GetColor(0xFFDF6B), factory.GetColor(0xFFFCE6)); visualStyle.ColumnHeaderStyles[StyleType.MouseOver] = colStyle; colStyle = new ColumnHeaderVisualStyle(); colStyle.Background = GetDefaultSelectedColumnBackground(factory); visualStyle.ColumnHeaderStyles[StyleType.Selected] = colStyle; colStyle = new ColumnHeaderVisualStyle(); colStyle.Background = GetSelectedColumnMouseOverBackground(factory); visualStyle.ColumnHeaderStyles[StyleType.SelectedMouseOver] = colStyle; }
private void InitGroupHeaderStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { GroupHeaderVisualStyle style = new GroupHeaderVisualStyle(); style.AllowWrap = Tbool.True; style.Alignment = Alignment.MiddleLeft; style.Font = SystemFonts.DefaultFont; style.Background = new Background(factory.GetColor(0xFFFFFF)); style.UnderlineColor = factory.GetColor(0x444444); style.RowHeaderStyle.Background = new Background(factory.GetColor(0xBABABA)); style.RowHeaderStyle.BorderHighlightColor = GetBorderHighlight(factory); style.RowHeaderStyle.Font = SystemFonts.DefaultFont; visualStyle.GroupHeaderStyles[StyleType.Default] = style; }
private void InitFilterColumnHeaderStyles( DefaultVisualStyles visualStyle, ColorFactory factory) { FilterColumnHeaderVisualStyle style = new FilterColumnHeaderVisualStyle(); style.Alignment = Alignment.MiddleLeft; style.Font = SystemFonts.CaptionFont; style.TextColor = Color.Black; style.ErrorTextColor = Color.Red; style.Background = new Background(factory.GetColor(0xEFF4FB), factory.GetColor(0xE1ECFA)); style.GripBarBackground = new Background(factory.GetColor(0xCFDDEE)); visualStyle.FilterColumnHeaderStyles[StyleType.Default] = style; style = new FilterColumnHeaderVisualStyle(); style.Background = new Background(factory.GetColor(0xFFDF6B), factory.GetColor(0xFFFCE6)); visualStyle.FilterColumnHeaderStyles[StyleType.MouseOver] = style; style = new FilterColumnHeaderVisualStyle(); style.Background = GetDefaultSelectedColumnBackground(factory); visualStyle.FilterColumnHeaderStyles[StyleType.Selected] = style; style = new FilterColumnHeaderVisualStyle(); style.Background = GetSelectedColumnMouseOverBackground(factory); visualStyle.FilterColumnHeaderStyles[StyleType.SelectedMouseOver] = style; }
private void InitFilterColumnHeaderStyles( DefaultVisualStyles visualStyle, ColorFactory factory) { FilterColumnHeaderVisualStyle colStyle = new FilterColumnHeaderVisualStyle(); colStyle.Alignment = Alignment.MiddleCenter; colStyle.Font = SystemFonts.CaptionFont; colStyle.TextColor = factory.GetColor(0xE2E2E2); colStyle.ErrorTextColor = Color.Red; colStyle.Background = new Background(factory.GetColor(0x6A6A6A)); colStyle.GripBarBackground = new Background(factory.GetColor(0x797979)); visualStyle.FilterColumnHeaderStyles[StyleType.Default] = colStyle; colStyle = new FilterColumnHeaderVisualStyle(); colStyle.Background = new Background(factory.GetColor(0xFFDF6B), factory.GetColor(0xFFFCE6)); colStyle.TextColor = factory.GetColor(0x444444); visualStyle.FilterColumnHeaderStyles[StyleType.MouseOver] = colStyle; colStyle = new FilterColumnHeaderVisualStyle(); colStyle.Background = GetDefaultSelectedColumnBackground(factory); visualStyle.FilterColumnHeaderStyles[StyleType.Selected] = colStyle; colStyle = new FilterColumnHeaderVisualStyle(); colStyle.Background = GetSelectedColumnMouseOverBackground(factory); visualStyle.FilterColumnHeaderStyles[StyleType.SelectedMouseOver] = colStyle; }
private void InitFilterRowStyles( DefaultVisualStyles visualStyle, ColorFactory factory) { FilterRowVisualStyle style = new FilterRowVisualStyle(); style.FilterBorderColor = factory.GetColor(0x697D96); style.FilterBackground = new Background(Color.White, factory.GetColor(0x4168B6), 0); style.WhiteSpaceBackground = new Background(factory.GetColor(0xCFDDEE)); style.RowHeader.Background = new Background(factory.GetColor(0xEFF5FB), factory.GetColor(0xE2EDFA), BackFillType.ForwardDiagonal); style.RowHeader.BorderHighlightColor = GetBorderHighlight(factory); visualStyle.FilterRowStyles[StyleType.Default] = style; style = style.Copy(); style.FilterBackground = new Background(Color.White, factory.GetColor(Color.Green), 0); visualStyle.FilterRowStyles[StyleType.Selected] = style; style = style.Copy(); style.FilterBackground = new Background(Color.White, factory.GetColor(0xE2AA00), 0); style.RowHeader.Background = new Background(factory.GetColor(0xFFDF6B), factory.GetColor(0xFFFCE6), BackFillType.Angle); visualStyle.FilterRowStyles[StyleType.MouseOver] = style; visualStyle.FilterRowStyles[StyleType.SelectedMouseOver] = style; }
private void InitGroupByStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { GroupByVisualStyle style = new GroupByVisualStyle(); style.Alignment = Alignment.MiddleCenter; style.GroupBoxConnectorColor = factory.GetColor(0x313131); // Panel border color style.GroupBoxBorderColor = factory.GetColor(0x313131); style.InsertMarkerBorderColor = factory.GetColor(0x313131); style.InsertMarkerBackground = new Background(factory.GetColor(Color.Red)); style.RowHeaderStyle.Background = new Background(factory.GetColor(0x6A6A6A), factory.GetColor(0x595959), BackFillType.ForwardDiagonal); style.RowHeaderStyle.BorderHighlightColor = GetBorderHighlight(factory); style.TextColor = factory.GetColor(0x363636); // Col text color style.GroupBoxBackground = new Background(factory.GetColor(0x6A6A6A)); // col background visualStyle.GroupByStyles[StyleType.Default] = style; style = new GroupByVisualStyle(); style.GroupBoxBackground = new Background(factory.GetColor(0xFFDF6B), factory.GetColor(0xFFFCE6)); // col background visualStyle.GroupByStyles[StyleType.MouseOver] = style; style = new GroupByVisualStyle(); style.GroupBoxBackground = GetDefaultSelectedColumnBackground(factory); // col background visualStyle.GroupByStyles[StyleType.Selected] = style; style = new GroupByVisualStyle(); style.GroupBoxBackground = GetSelectedColumnMouseOverBackground(factory); // col background visualStyle.GroupByStyles[StyleType.SelectedMouseOver] = style; }
private void InitTextRowStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { TextRowVisualStyle style = new TextRowVisualStyle(); style.Alignment = Alignment.MiddleCenter; style.AllowWrap = Tbool.True; style.Background = new Background(factory.GetColor(0x6A6A6A)); style.BorderColor = new BorderColor(factory.GetColor(0x444444)); style.Padding.All = 2; style.TextColor = factory.GetColor(0xE2E2E2); style.RowHeaderStyle.Background = new Background(factory.GetColor(0x6A6A6A)); style.RowHeaderStyle.BorderHighlightColor = GetBorderHighlight(factory); visualStyle.TitleStyles[StyleType.Default] = style; visualStyle.HeaderStyles[StyleType.Default] = style.Copy(); visualStyle.FooterStyles[StyleType.Default] = style.Copy(); style = style.Copy(); style.Background = new Background(factory.GetColor(0x686868)); visualStyle.CaptionStyles[StyleType.Default] = style; }
/// <summary> /// Replaces an system style with the specified visual style. /// </summary> /// <param name="style">SuperGridStyle to replace.</param> /// <param name="visualStyle">DefaultVisualStyles to replace the system style with.</param> public static void SetStyleFactory(SuperGridStyle style, DefaultVisualStyles visualStyle) { _DefaultStyles[style] = visualStyle; }
private void InitTextRowStyles(DefaultVisualStyles visualStyle, ColorFactory factory) { TextRowVisualStyle style = new TextRowVisualStyle(); style.Alignment = Alignment.MiddleCenter; style.AllowWrap = Tbool.True; style.Background = new Background(factory.GetColor(0xF5F7F9), factory.GetColor(0xEFF2F6), BackFillType.Angle); style.BorderColor = new BorderColor(factory.GetColor(0xA5ACB5)); style.Padding.All = 2; style.TextColor = factory.GetColor(0x3B3B3B); style.RowHeaderStyle.Background = new Background(factory.GetColor(0xF5F7F9), factory.GetColor(0xEFF2F6), BackFillType.Angle); style.RowHeaderStyle.BorderHighlightColor = GetBorderHighlight(factory); visualStyle.TitleStyles[StyleType.Default] = style; visualStyle.HeaderStyles[StyleType.Default] = style.Copy(); visualStyle.FooterStyles[StyleType.Default] = style.Copy(); style = style.Copy(); style.Background = new Background(factory.GetColor(0xE9EDF1)); visualStyle.CaptionStyles[StyleType.Default] = style; }