void RefreshColor(RibbonColorPart rcp, Color color) { ((RibbonProfessionalRenderer)ribbon1.Renderer).ColorTable.SetColor(rcp, color); dicPanel[rcp].BackColor = color; dicTxt[rcp].Text = ((RibbonProfessionalRenderer)ribbon1.Renderer).ColorTable.GetColorHexStr(rcp); ribbon1.Refresh(); }
private void b_InvertClick(object sender, EventArgs e) { RibbonProfesionalRendererColorTable r = ribbon1.Theme.RendererColorTable; RibbonColorPart rcp = (RibbonColorPart)((CheckBox)sender).Tag; Color originalColor = r.GetColor(rcp); RefreshColor(rcp, Color.FromArgb(originalColor.A, 255 - originalColor.R, 255 - originalColor.G, 255 - originalColor.B)); }
private void nud_ValueChanged(object sender, EventArgs e) { RibbonProfesionalRendererColorTable r = ribbon1.Theme.RendererColorTable; RibbonColorPart rcp = (RibbonColorPart)((NumericUpDown)sender).Tag; Color originalColor = r.GetColor(rcp); RefreshColor(rcp, Color.FromArgb((int)((NumericUpDown)sender).Value, originalColor)); }
private void RefreshColor(RibbonColorPart rcp, Color color) { ribbon1.Theme.RendererColorTable.SetColor(rcp, color); dicPanel[rcp].BackColor = color; dicTxt[rcp].Text = ribbon1.Theme.RendererColorTable.GetColorHexStr(rcp); ribbon1.Refresh(); this.Refresh(); }
public string GetColorHexStr(RibbonColorPart ribbonColorPart) { Color c = GetColor(ribbonColorPart); StringBuilder sb = new StringBuilder(); sb.AppendFormat("#"); sb.Append(BitConverter.ToString(new byte[] { c.R })); sb.Append(BitConverter.ToString(new byte[] { c.G })); sb.Append(BitConverter.ToString(new byte[] { c.B })); return(sb.ToString()); }
private void b_Click(object sender, EventArgs e) { ColorDialog d = new ColorDialog(); d.FullOpen = true; d.AllowFullOpen = true; if (d.ShowDialog() == DialogResult.OK) { RibbonColorPart rcp = (RibbonColorPart)((Button)sender).Tag; RefreshColor(rcp, d.Color); } }
void t_LostFocus(object sender, EventArgs e) { try { Color color = ((RibbonProfessionalRenderer)ribbon1.Renderer).ColorTable.FromHex(((TextBox)sender).Text); RibbonColorPart rcp = (RibbonColorPart)((TextBox)sender).Tag; RefreshColor(rcp, color); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void t_KeyPress(object sender, KeyPressEventArgs e) { try { if (((TextBox)sender).Text.Length == 7) { Color color = ribbon1.Theme.RendererColorTable.FromHex(((TextBox)sender).Text); RibbonColorPart rcp = (RibbonColorPart)((TextBox)sender).Tag; RefreshColor(rcp, color); } else if (((TextBox)sender).Text.Length > 7) { MessageBox.Show("Value is to long."); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void t_LostFocus(object sender, EventArgs e) { try { if (((TextBox)sender).Text.Length == 7) { RibbonProfesionalRendererColorTable r = ribbon1.Theme.RendererColorTable; Color color = ribbon1.Theme.RendererColorTable.FromHex(((TextBox)sender).Text); RibbonColorPart rcp = (RibbonColorPart)((TextBox)sender).Tag; RefreshColor(rcp, Color.FromArgb(r.GetColor(rcp).A, color)); } else if (((TextBox)sender).Text.Length > 7) { MessageBox.Show("Value is to long."); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public string GetColorHexStr(RibbonColorPart ribbonColorPart) { Color c = GetColor(ribbonColorPart); StringBuilder sb = new StringBuilder(); sb.AppendFormat("#"); sb.Append(BitConverter.ToString(new byte[] { c.R })); sb.Append(BitConverter.ToString(new byte[] { c.G })); sb.Append(BitConverter.ToString(new byte[] { c.B })); return sb.ToString(); }
public void SetColor(RibbonColorPart ribbonColorPart, string hexColor) { SetColor(ribbonColorPart, FromHex(hexColor)); }
// added by adriancs (13 Jan 2013) #region Colors and Theme File Reading/Writting public void SetColor(RibbonColorPart ribbonColorPart, int red, int green, int blue) { SetColor(ribbonColorPart, Color.FromArgb(red, green, blue)); }
public void SetColor(RibbonColorPart ribbonColorPart, Color color) { switch (ribbonColorPart) { case RibbonColorPart.OrbDropDownDarkBorder: OrbDropDownDarkBorder = color; break; case RibbonColorPart.OrbDropDownLightBorder: OrbDropDownLightBorder = color; break; case RibbonColorPart.OrbDropDownBack: OrbDropDownBack = color; break; case RibbonColorPart.OrbDropDownNorthA: OrbDropDownNorthA = color; break; case RibbonColorPart.OrbDropDownNorthB: OrbDropDownNorthB = color; break; case RibbonColorPart.OrbDropDownNorthC: OrbDropDownNorthC = color; break; case RibbonColorPart.OrbDropDownNorthD: OrbDropDownNorthD = color; break; case RibbonColorPart.OrbDropDownSouthC: OrbDropDownSouthC = color; break; case RibbonColorPart.OrbDropDownSouthD: OrbDropDownSouthD = color; break; case RibbonColorPart.OrbDropDownContentbg: OrbDropDownContentbg = color; break; case RibbonColorPart.OrbDropDownContentbglight: OrbDropDownContentbglight = color; break; case RibbonColorPart.OrbDropDownSeparatorlight: OrbDropDownSeparatorlight = color; break; case RibbonColorPart.OrbDropDownSeparatordark: OrbDropDownSeparatordark = color; break; case RibbonColorPart.Caption1: Caption1 = color; break; case RibbonColorPart.Caption2: Caption2 = color; break; case RibbonColorPart.Caption3: Caption3 = color; break; case RibbonColorPart.Caption4: Caption4 = color; break; case RibbonColorPart.Caption5: Caption5 = color; break; case RibbonColorPart.Caption6: Caption6 = color; break; case RibbonColorPart.Caption7: Caption7 = color; break; case RibbonColorPart.QuickAccessBorderDark: QuickAccessBorderDark = color; break; case RibbonColorPart.QuickAccessBorderLight: QuickAccessBorderLight = color; break; case RibbonColorPart.QuickAccessUpper: QuickAccessUpper = color; break; case RibbonColorPart.QuickAccessLower: QuickAccessLower = color; break; case RibbonColorPart.OrbOptionBorder: OrbOptionBorder = color; break; case RibbonColorPart.OrbOptionBackground: OrbOptionBackground = color; break; case RibbonColorPart.OrbOptionShine: OrbOptionShine = color; break; case RibbonColorPart.Arrow: Arrow = color; break; case RibbonColorPart.ArrowLight: ArrowLight = color; break; case RibbonColorPart.ArrowDisabled: ArrowDisabled = color; break; case RibbonColorPart.Text: Text = color; break; case RibbonColorPart.RibbonBackground: RibbonBackground = color; break; case RibbonColorPart.TabBorder: TabBorder = color; break; case RibbonColorPart.TabNorth: TabNorth = color; break; case RibbonColorPart.TabSouth: TabSouth = color; break; case RibbonColorPart.TabGlow: TabGlow = color; break; case RibbonColorPart.TabText: TabText = color; break; case RibbonColorPart.TabActiveText: TabActiveText = color; break; case RibbonColorPart.TabContentNorth: TabContentNorth = color; break; case RibbonColorPart.TabContentSouth: TabContentSouth = color; break; case RibbonColorPart.TabSelectedGlow: TabSelectedGlow = color; break; case RibbonColorPart.PanelDarkBorder: PanelDarkBorder = color; break; case RibbonColorPart.PanelLightBorder: PanelLightBorder = color; break; case RibbonColorPart.PanelTextBackground: PanelTextBackground = color; break; case RibbonColorPart.PanelTextBackgroundSelected: PanelTextBackgroundSelected = color; break; case RibbonColorPart.PanelText: PanelText = color; break; case RibbonColorPart.PanelBackgroundSelected: PanelBackgroundSelected = color; break; case RibbonColorPart.PanelOverflowBackground: PanelOverflowBackground = color; break; case RibbonColorPart.PanelOverflowBackgroundPressed: PanelOverflowBackgroundPressed = color; break; case RibbonColorPart.PanelOverflowBackgroundSelectedNorth: PanelOverflowBackgroundSelectedNorth = color; break; case RibbonColorPart.PanelOverflowBackgroundSelectedSouth: PanelOverflowBackgroundSelectedSouth = color; break; case RibbonColorPart.ButtonBgOut: ButtonBgOut = color; break; case RibbonColorPart.ButtonBgCenter: ButtonBgCenter = color; break; case RibbonColorPart.ButtonBorderOut: ButtonBorderOut = color; break; case RibbonColorPart.ButtonBorderIn: ButtonBorderIn = color; break; case RibbonColorPart.ButtonGlossyNorth: ButtonGlossyNorth = color; break; case RibbonColorPart.ButtonGlossySouth: ButtonGlossySouth = color; break; case RibbonColorPart.ButtonDisabledBgOut: ButtonDisabledBgOut = color; break; case RibbonColorPart.ButtonDisabledBgCenter: ButtonDisabledBgCenter = color; break; case RibbonColorPart.ButtonDisabledBorderOut: ButtonDisabledBorderOut = color; break; case RibbonColorPart.ButtonDisabledBorderIn: ButtonDisabledBorderIn = color; break; case RibbonColorPart.ButtonDisabledGlossyNorth: ButtonDisabledGlossyNorth = color; break; case RibbonColorPart.ButtonDisabledGlossySouth: ButtonDisabledGlossySouth = color; break; case RibbonColorPart.ButtonSelectedBgOut: ButtonSelectedBgOut = color; break; case RibbonColorPart.ButtonSelectedBgCenter: ButtonSelectedBgCenter = color; break; case RibbonColorPart.ButtonSelectedBorderOut: ButtonSelectedBorderOut = color; break; case RibbonColorPart.ButtonSelectedBorderIn: ButtonSelectedBorderIn = color; break; case RibbonColorPart.ButtonSelectedGlossyNorth: ButtonSelectedGlossyNorth = color; break; case RibbonColorPart.ButtonSelectedGlossySouth: ButtonSelectedGlossySouth = color; break; case RibbonColorPart.ButtonPressedBgOut: ButtonPressedBgOut = color; break; case RibbonColorPart.ButtonPressedBgCenter: ButtonPressedBgCenter = color; break; case RibbonColorPart.ButtonPressedBorderOut: ButtonPressedBorderOut = color; break; case RibbonColorPart.ButtonPressedBorderIn: ButtonPressedBorderIn = color; break; case RibbonColorPart.ButtonPressedGlossyNorth: ButtonPressedGlossyNorth = color; break; case RibbonColorPart.ButtonPressedGlossySouth: ButtonPressedGlossySouth = color; break; case RibbonColorPart.ButtonCheckedBgOut: ButtonCheckedBgOut = color; break; case RibbonColorPart.ButtonCheckedBgCenter: ButtonCheckedBgCenter = color; break; case RibbonColorPart.ButtonCheckedBorderOut: ButtonCheckedBorderOut = color; break; case RibbonColorPart.ButtonCheckedBorderIn: ButtonCheckedBorderIn = color; break; case RibbonColorPart.ButtonCheckedGlossyNorth: ButtonCheckedGlossyNorth = color; break; case RibbonColorPart.ButtonCheckedGlossySouth: ButtonCheckedGlossySouth = color; break; case RibbonColorPart.ItemGroupOuterBorder: ItemGroupOuterBorder = color; break; case RibbonColorPart.ItemGroupInnerBorder: ItemGroupInnerBorder = color; break; case RibbonColorPart.ItemGroupSeparatorLight: ItemGroupSeparatorLight = color; break; case RibbonColorPart.ItemGroupSeparatorDark: ItemGroupSeparatorDark = color; break; case RibbonColorPart.ItemGroupBgNorth: ItemGroupBgNorth = color; break; case RibbonColorPart.ItemGroupBgSouth: ItemGroupBgSouth = color; break; case RibbonColorPart.ItemGroupBgGlossy: ItemGroupBgGlossy = color; break; case RibbonColorPart.ButtonListBorder: ButtonListBorder = color; break; case RibbonColorPart.ButtonListBg: ButtonListBg = color; break; case RibbonColorPart.ButtonListBgSelected: ButtonListBgSelected = color; break; case RibbonColorPart.DropDownBg: DropDownBg = color; break; case RibbonColorPart.DropDownImageBg: DropDownImageBg = color; break; case RibbonColorPart.DropDownImageSeparator: DropDownImageSeparator = color; break; case RibbonColorPart.DropDownBorder: DropDownBorder = color; break; case RibbonColorPart.DropDownGripNorth: DropDownGripNorth = color; break; case RibbonColorPart.DropDownGripSouth: DropDownGripSouth = color; break; case RibbonColorPart.DropDownGripBorder: DropDownGripBorder = color; break; case RibbonColorPart.DropDownGripDark: DropDownGripDark = color; break; case RibbonColorPart.DropDownGripLight: DropDownGripLight = color; break; case RibbonColorPart.SeparatorLight: SeparatorLight = color; break; case RibbonColorPart.SeparatorDark: SeparatorDark = color; break; case RibbonColorPart.SeparatorBg: SeparatorBg = color; break; case RibbonColorPart.SeparatorLine: SeparatorLine = color; break; case RibbonColorPart.TextBoxUnselectedBg: TextBoxUnselectedBg = color; break; case RibbonColorPart.TextBoxBorder: TextBoxBorder = color; break; case RibbonColorPart.ToolTipContentNorth: ToolTipContentNorth = color; break; case RibbonColorPart.ToolTipContentSouth: ToolTipContentSouth = color; break; case RibbonColorPart.ToolTipDarkBorder: ToolTipDarkBorder = color; break; case RibbonColorPart.ToolTipLightBorder: ToolTipLightBorder = color; break; default: break; } }
public Color GetColor(RibbonColorPart ribbonColorPart) { switch (ribbonColorPart) { case RibbonColorPart.OrbDropDownDarkBorder: return(OrbDropDownDarkBorder); case RibbonColorPart.OrbDropDownLightBorder: return(OrbDropDownLightBorder); case RibbonColorPart.OrbDropDownBack: return(OrbDropDownBack); case RibbonColorPart.OrbDropDownNorthA: return(OrbDropDownNorthA); case RibbonColorPart.OrbDropDownNorthB: return(OrbDropDownNorthB); case RibbonColorPart.OrbDropDownNorthC: return(OrbDropDownNorthC); case RibbonColorPart.OrbDropDownNorthD: return(OrbDropDownNorthD); case RibbonColorPart.OrbDropDownSouthC: return(OrbDropDownSouthC); case RibbonColorPart.OrbDropDownSouthD: return(OrbDropDownSouthD); case RibbonColorPart.OrbDropDownContentbg: return(OrbDropDownContentbg); case RibbonColorPart.OrbDropDownContentbglight: return(OrbDropDownContentbglight); case RibbonColorPart.OrbDropDownSeparatorlight: return(OrbDropDownSeparatorlight); case RibbonColorPart.OrbDropDownSeparatordark: return(OrbDropDownSeparatordark); case RibbonColorPart.Caption1: return(Caption1); case RibbonColorPart.Caption2: return(Caption2); case RibbonColorPart.Caption3: return(Caption3); case RibbonColorPart.Caption4: return(Caption4); case RibbonColorPart.Caption5: return(Caption5); case RibbonColorPart.Caption6: return(Caption6); case RibbonColorPart.Caption7: return(Caption7); case RibbonColorPart.QuickAccessBorderDark: return(QuickAccessBorderDark); case RibbonColorPart.QuickAccessBorderLight: return(QuickAccessBorderLight); case RibbonColorPart.QuickAccessUpper: return(QuickAccessUpper); case RibbonColorPart.QuickAccessLower: return(QuickAccessLower); case RibbonColorPart.OrbOptionBorder: return(OrbOptionBorder); case RibbonColorPart.OrbOptionBackground: return(OrbOptionBackground); case RibbonColorPart.OrbOptionShine: return(OrbOptionShine); case RibbonColorPart.Arrow: return(Arrow); case RibbonColorPart.ArrowLight: return(ArrowLight); case RibbonColorPart.ArrowDisabled: return(ArrowDisabled); case RibbonColorPart.Text: return(Text); case RibbonColorPart.RibbonBackground: return(RibbonBackground); case RibbonColorPart.TabBorder: return(TabBorder); case RibbonColorPart.TabNorth: return(TabNorth); case RibbonColorPart.TabSouth: return(TabSouth); case RibbonColorPart.TabGlow: return(TabGlow); case RibbonColorPart.TabText: return(TabText); case RibbonColorPart.TabActiveText: return(TabActiveText); case RibbonColorPart.TabContentNorth: return(TabContentNorth); case RibbonColorPart.TabContentSouth: return(TabContentSouth); case RibbonColorPart.TabSelectedGlow: return(TabSelectedGlow); case RibbonColorPart.PanelDarkBorder: return(PanelDarkBorder); case RibbonColorPart.PanelLightBorder: return(PanelLightBorder); case RibbonColorPart.PanelTextBackground: return(PanelTextBackground); case RibbonColorPart.PanelTextBackgroundSelected: return(PanelTextBackgroundSelected); case RibbonColorPart.PanelText: return(PanelText); case RibbonColorPart.PanelBackgroundSelected: return(PanelBackgroundSelected); case RibbonColorPart.PanelOverflowBackground: return(PanelOverflowBackground); case RibbonColorPart.PanelOverflowBackgroundPressed: return(PanelOverflowBackgroundPressed); case RibbonColorPart.PanelOverflowBackgroundSelectedNorth: return(PanelOverflowBackgroundSelectedNorth); case RibbonColorPart.PanelOverflowBackgroundSelectedSouth: return(PanelOverflowBackgroundSelectedSouth); case RibbonColorPart.ButtonBgOut: return(ButtonBgOut); case RibbonColorPart.ButtonBgCenter: return(ButtonBgCenter); case RibbonColorPart.ButtonBorderOut: return(ButtonBorderOut); case RibbonColorPart.ButtonBorderIn: return(ButtonBorderIn); case RibbonColorPart.ButtonGlossyNorth: return(ButtonGlossyNorth); case RibbonColorPart.ButtonGlossySouth: return(ButtonGlossySouth); case RibbonColorPart.ButtonDisabledBgOut: return(ButtonDisabledBgOut); case RibbonColorPart.ButtonDisabledBgCenter: return(ButtonDisabledBgCenter); case RibbonColorPart.ButtonDisabledBorderOut: return(ButtonDisabledBorderOut); case RibbonColorPart.ButtonDisabledBorderIn: return(ButtonDisabledBorderIn); case RibbonColorPart.ButtonDisabledGlossyNorth: return(ButtonDisabledGlossyNorth); case RibbonColorPart.ButtonDisabledGlossySouth: return(ButtonDisabledGlossySouth); case RibbonColorPart.ButtonSelectedBgOut: return(ButtonSelectedBgOut); case RibbonColorPart.ButtonSelectedBgCenter: return(ButtonSelectedBgCenter); case RibbonColorPart.ButtonSelectedBorderOut: return(ButtonSelectedBorderOut); case RibbonColorPart.ButtonSelectedBorderIn: return(ButtonSelectedBorderIn); case RibbonColorPart.ButtonSelectedGlossyNorth: return(ButtonSelectedGlossyNorth); case RibbonColorPart.ButtonSelectedGlossySouth: return(ButtonSelectedGlossySouth); case RibbonColorPart.ButtonPressedBgOut: return(ButtonPressedBgOut); case RibbonColorPart.ButtonPressedBgCenter: return(ButtonPressedBgCenter); case RibbonColorPart.ButtonPressedBorderOut: return(ButtonPressedBorderOut); case RibbonColorPart.ButtonPressedBorderIn: return(ButtonPressedBorderIn); case RibbonColorPart.ButtonPressedGlossyNorth: return(ButtonPressedGlossyNorth); case RibbonColorPart.ButtonPressedGlossySouth: return(ButtonPressedGlossySouth); case RibbonColorPart.ButtonCheckedBgOut: return(ButtonCheckedBgOut); case RibbonColorPart.ButtonCheckedBgCenter: return(ButtonCheckedBgCenter); case RibbonColorPart.ButtonCheckedBorderOut: return(ButtonCheckedBorderOut); case RibbonColorPart.ButtonCheckedBorderIn: return(ButtonCheckedBorderIn); case RibbonColorPart.ButtonCheckedGlossyNorth: return(ButtonCheckedGlossyNorth); case RibbonColorPart.ButtonCheckedGlossySouth: return(ButtonCheckedGlossySouth); case RibbonColorPart.ItemGroupOuterBorder: return(ItemGroupOuterBorder); case RibbonColorPart.ItemGroupInnerBorder: return(ItemGroupInnerBorder); case RibbonColorPart.ItemGroupSeparatorLight: return(ItemGroupSeparatorLight); case RibbonColorPart.ItemGroupSeparatorDark: return(ItemGroupSeparatorDark); case RibbonColorPart.ItemGroupBgNorth: return(ItemGroupBgNorth); case RibbonColorPart.ItemGroupBgSouth: return(ItemGroupBgSouth); case RibbonColorPart.ItemGroupBgGlossy: return(ItemGroupBgGlossy); case RibbonColorPart.ButtonListBorder: return(ButtonListBorder); case RibbonColorPart.ButtonListBg: return(ButtonListBg); case RibbonColorPart.ButtonListBgSelected: return(ButtonListBgSelected); case RibbonColorPart.DropDownBg: return(DropDownBg); case RibbonColorPart.DropDownImageBg: return(DropDownImageBg); case RibbonColorPart.DropDownImageSeparator: return(DropDownImageSeparator); case RibbonColorPart.DropDownBorder: return(DropDownBorder); case RibbonColorPart.DropDownGripNorth: return(DropDownGripNorth); case RibbonColorPart.DropDownGripSouth: return(DropDownGripSouth); case RibbonColorPart.DropDownGripBorder: return(DropDownGripBorder); case RibbonColorPart.DropDownGripDark: return(DropDownGripDark); case RibbonColorPart.DropDownGripLight: return(DropDownGripLight); case RibbonColorPart.SeparatorLight: return(SeparatorLight); case RibbonColorPart.SeparatorDark: return(SeparatorDark); case RibbonColorPart.SeparatorBg: return(SeparatorBg); case RibbonColorPart.SeparatorLine: return(SeparatorLine); case RibbonColorPart.TextBoxUnselectedBg: return(TextBoxUnselectedBg); case RibbonColorPart.TextBoxBorder: return(TextBoxBorder); case RibbonColorPart.ToolTipContentNorth: return(ToolTipContentNorth); case RibbonColorPart.ToolTipContentSouth: return(ToolTipContentSouth); case RibbonColorPart.ToolTipDarkBorder: return(ToolTipDarkBorder); case RibbonColorPart.ToolTipLightBorder: return(ToolTipLightBorder); default: return(Color.White); } }
public Color GetColor(RibbonColorPart ribbonColorPart) { switch (ribbonColorPart) { case RibbonColorPart.OrbDropDownDarkBorder: return OrbDropDownDarkBorder; case RibbonColorPart.OrbDropDownLightBorder: return OrbDropDownLightBorder; case RibbonColorPart.OrbDropDownBack: return OrbDropDownBack; case RibbonColorPart.OrbDropDownNorthA: return OrbDropDownNorthA; case RibbonColorPart.OrbDropDownNorthB: return OrbDropDownNorthB; case RibbonColorPart.OrbDropDownNorthC: return OrbDropDownNorthC; case RibbonColorPart.OrbDropDownNorthD: return OrbDropDownNorthD; case RibbonColorPart.OrbDropDownSouthC: return OrbDropDownSouthC; case RibbonColorPart.OrbDropDownSouthD: return OrbDropDownSouthD; case RibbonColorPart.OrbDropDownContentbg: return OrbDropDownContentbg; case RibbonColorPart.OrbDropDownContentbglight: return OrbDropDownContentbglight; case RibbonColorPart.OrbDropDownSeparatorlight: return OrbDropDownSeparatorlight; case RibbonColorPart.OrbDropDownSeparatordark: return OrbDropDownSeparatordark; case RibbonColorPart.Caption1: return Caption1; case RibbonColorPart.Caption2: return Caption2; case RibbonColorPart.Caption3: return Caption3; case RibbonColorPart.Caption4: return Caption4; case RibbonColorPart.Caption5: return Caption5; case RibbonColorPart.Caption6: return Caption6; case RibbonColorPart.Caption7: return Caption7; case RibbonColorPart.QuickAccessBorderDark: return QuickAccessBorderDark; case RibbonColorPart.QuickAccessBorderLight: return QuickAccessBorderLight; case RibbonColorPart.QuickAccessUpper: return QuickAccessUpper; case RibbonColorPart.QuickAccessLower: return QuickAccessLower; case RibbonColorPart.OrbOptionBorder: return OrbOptionBorder; case RibbonColorPart.OrbOptionBackground: return OrbOptionBackground; case RibbonColorPart.OrbOptionShine: return OrbOptionShine; case RibbonColorPart.Arrow: return Arrow; case RibbonColorPart.ArrowLight: return ArrowLight; case RibbonColorPart.ArrowDisabled: return ArrowDisabled; case RibbonColorPart.Text: return Text; case RibbonColorPart.RibbonBackground: return RibbonBackground; case RibbonColorPart.TabBorder: return TabBorder; case RibbonColorPart.TabNorth: return TabNorth; case RibbonColorPart.TabSouth: return TabSouth; case RibbonColorPart.TabGlow: return TabGlow; case RibbonColorPart.TabText: return TabText; case RibbonColorPart.TabActiveText: return TabActiveText; case RibbonColorPart.TabContentNorth: return TabContentNorth; case RibbonColorPart.TabContentSouth: return TabContentSouth; case RibbonColorPart.TabSelectedGlow: return TabSelectedGlow; case RibbonColorPart.PanelDarkBorder: return PanelDarkBorder; case RibbonColorPart.PanelLightBorder: return PanelLightBorder; case RibbonColorPart.PanelTextBackground: return PanelTextBackground; case RibbonColorPart.PanelTextBackgroundSelected: return PanelTextBackgroundSelected; case RibbonColorPart.PanelText: return PanelText; case RibbonColorPart.PanelBackgroundSelected: return PanelBackgroundSelected; case RibbonColorPart.PanelOverflowBackground: return PanelOverflowBackground; case RibbonColorPart.PanelOverflowBackgroundPressed: return PanelOverflowBackgroundPressed; case RibbonColorPart.PanelOverflowBackgroundSelectedNorth: return PanelOverflowBackgroundSelectedNorth; case RibbonColorPart.PanelOverflowBackgroundSelectedSouth: return PanelOverflowBackgroundSelectedSouth; case RibbonColorPart.ButtonBgOut: return ButtonBgOut; case RibbonColorPart.ButtonBgCenter: return ButtonBgCenter; case RibbonColorPart.ButtonBorderOut: return ButtonBorderOut; case RibbonColorPart.ButtonBorderIn: return ButtonBorderIn; case RibbonColorPart.ButtonGlossyNorth: return ButtonGlossyNorth; case RibbonColorPart.ButtonGlossySouth: return ButtonGlossySouth; case RibbonColorPart.ButtonDisabledBgOut: return ButtonDisabledBgOut; case RibbonColorPart.ButtonDisabledBgCenter: return ButtonDisabledBgCenter; case RibbonColorPart.ButtonDisabledBorderOut: return ButtonDisabledBorderOut; case RibbonColorPart.ButtonDisabledBorderIn: return ButtonDisabledBorderIn; case RibbonColorPart.ButtonDisabledGlossyNorth: return ButtonDisabledGlossyNorth; case RibbonColorPart.ButtonDisabledGlossySouth: return ButtonDisabledGlossySouth; case RibbonColorPart.ButtonSelectedBgOut: return ButtonSelectedBgOut; case RibbonColorPart.ButtonSelectedBgCenter: return ButtonSelectedBgCenter; case RibbonColorPart.ButtonSelectedBorderOut: return ButtonSelectedBorderOut; case RibbonColorPart.ButtonSelectedBorderIn: return ButtonSelectedBorderIn; case RibbonColorPart.ButtonSelectedGlossyNorth: return ButtonSelectedGlossyNorth; case RibbonColorPart.ButtonSelectedGlossySouth: return ButtonSelectedGlossySouth; case RibbonColorPart.ButtonPressedBgOut: return ButtonPressedBgOut; case RibbonColorPart.ButtonPressedBgCenter: return ButtonPressedBgCenter; case RibbonColorPart.ButtonPressedBorderOut: return ButtonPressedBorderOut; case RibbonColorPart.ButtonPressedBorderIn: return ButtonPressedBorderIn; case RibbonColorPart.ButtonPressedGlossyNorth: return ButtonPressedGlossyNorth; case RibbonColorPart.ButtonPressedGlossySouth: return ButtonPressedGlossySouth; case RibbonColorPart.ButtonCheckedBgOut: return ButtonCheckedBgOut; case RibbonColorPart.ButtonCheckedBgCenter: return ButtonCheckedBgCenter; case RibbonColorPart.ButtonCheckedBorderOut: return ButtonCheckedBorderOut; case RibbonColorPart.ButtonCheckedBorderIn: return ButtonCheckedBorderIn; case RibbonColorPart.ButtonCheckedGlossyNorth: return ButtonCheckedGlossyNorth; case RibbonColorPart.ButtonCheckedGlossySouth: return ButtonCheckedGlossySouth; case RibbonColorPart.ItemGroupOuterBorder: return ItemGroupOuterBorder; case RibbonColorPart.ItemGroupInnerBorder: return ItemGroupInnerBorder; case RibbonColorPart.ItemGroupSeparatorLight: return ItemGroupSeparatorLight; case RibbonColorPart.ItemGroupSeparatorDark: return ItemGroupSeparatorDark; case RibbonColorPart.ItemGroupBgNorth: return ItemGroupBgNorth; case RibbonColorPart.ItemGroupBgSouth: return ItemGroupBgSouth; case RibbonColorPart.ItemGroupBgGlossy: return ItemGroupBgGlossy; case RibbonColorPart.ButtonListBorder: return ButtonListBorder; case RibbonColorPart.ButtonListBg: return ButtonListBg; case RibbonColorPart.ButtonListBgSelected: return ButtonListBgSelected; case RibbonColorPart.DropDownBg: return DropDownBg; case RibbonColorPart.DropDownImageBg: return DropDownImageBg; case RibbonColorPart.DropDownImageSeparator: return DropDownImageSeparator; case RibbonColorPart.DropDownBorder: return DropDownBorder; case RibbonColorPart.DropDownGripNorth: return DropDownGripNorth; case RibbonColorPart.DropDownGripSouth: return DropDownGripSouth; case RibbonColorPart.DropDownGripBorder: return DropDownGripBorder; case RibbonColorPart.DropDownGripDark: return DropDownGripDark; case RibbonColorPart.DropDownGripLight: return DropDownGripLight; case RibbonColorPart.SeparatorLight: return SeparatorLight; case RibbonColorPart.SeparatorDark: return SeparatorDark; case RibbonColorPart.SeparatorBg: return SeparatorBg; case RibbonColorPart.SeparatorLine: return SeparatorLine; case RibbonColorPart.TextBoxUnselectedBg: return TextBoxUnselectedBg; case RibbonColorPart.TextBoxBorder: return TextBoxBorder; case RibbonColorPart.ToolTipContentNorth: return ToolTipContentNorth; case RibbonColorPart.ToolTipContentSouth: return ToolTipContentSouth; case RibbonColorPart.ToolTipDarkBorder: return ToolTipDarkBorder; case RibbonColorPart.ToolTipLightBorder: return ToolTipLightBorder; default: return Color.White; } }
void RefreshColor(RibbonColorPart rcp, Color color) { Theme.ColorTable.SetColor(rcp, color); dicPanel[rcp].BackColor = color; dicTxt[rcp].Text = Theme.ColorTable.GetColorHexStr(rcp); ribbon1.Refresh(); this.Refresh(); }
public void SetColor(RibbonColorPart ribbonColorPart, int red, int green, int blue) { SetColor(ribbonColorPart, Color.FromArgb(red, green, blue)); }