static StandardButton() { var theme = new ButtonLinesTheme { Disabled = new Cell(Color.Gray, DefaultBackground), Normal = new Cell(Color.White, DefaultBackground) }; Library.Default.SetControlTheme(typeof(StandardButton), theme); }
protected void CreateButtonTheme( ) { switch (ButtonStyle) { case ButtonStyles.Thinlines: ButtonTheme = new ButtonLinesTheme { BottomRightLineColors = Appearance_ControlDisabled, TopLeftLineColors = Appearance_ControlFocused, Normal = new Cell(TextDark, (ControlBackLight * 1.3f).FillAlpha()), Disabled = Appearance_ControlDisabled, MouseOver = new Cell(TextBright, (ControlBackLight * 1.6f).FillAlpha()), Focused = new Cell(TextDark, (ControlBackLight * 1.3f).FillAlpha()), MouseDown = Appearance_ControlMouseDown, }; break; case ButtonStyles.Normal: ButtonTheme = new ButtonTheme { Normal = new Cell(TextDark, (ControlBackLight * 1.3f).FillAlpha()), Disabled = Appearance_ControlDisabled, MouseOver = new Cell(TextBright, (ControlBackLight * 1.6f).FillAlpha()), Focused = new Cell(TextDark, (ControlBackLight * 1.3f).FillAlpha()), MouseDown = Appearance_ControlMouseDown, ShowEnds = false, }; break; default: ButtonTheme = new ButtonTheme { Normal = new Cell(TextDark, (ControlBackLight * 1.3f).FillAlpha()), Disabled = Appearance_ControlDisabled, MouseOver = new Cell(TextBright, (ControlBackLight * 1.6f).FillAlpha()), Focused = new Cell(TextDark, (ControlBackLight * 1.3f).FillAlpha()), MouseDown = Appearance_ControlMouseDown, ShowEnds = true, }; break; } }