Themes and Visual Styles in Windows Forms NumericUpDown

28 Apr 20212 minutes to read

This section discusses themes and visual styles settings of the NumericUpDownExt control.

Themes

Themes define the look and feel of the NumericUpDownExt control. They can be set using the property given below.

NumericUpDownExt Property Description
ThemesEnabled Specifies whether XP Themes (visual styles) should be used for this control when available.
this.numericUpDownExt1.ThemesEnabled = true;                          
Me.numericUpDownExt1.ThemesEnabled = True

Themes-and-Visual-Styles_img1

Visual styles

Visual Styles enhance the appearance of the NumericUpDownExt control and can be set using the property given below.

NumericUpDownExt Properties Description
VisualStyle Specifies the visual style of the NumericUpDownExt control. It includes the options given below.Default andOffice2007.
ColorScheme Gets / sets Office2007Theme for Office2007 style.
this.numericUpDownExt1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Office2007;
this.numericUpDownExt1.ColorScheme = Syncfusion.Windows.Forms.Office2007Theme.Blue;    
Me.numericUpDownExt1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Office2007
Me.numericUpDownExt1.ColorScheme = Syncfusion.Windows.Forms.Office2007Theme.Blue

Themes-and-Visual-Styles_img2

Themes-and-Visual-Styles_img3

When the ColorScheme property is set to ‘Managed’, the NumericUpDownExt control can be displayed using custom colors supported by the control.

This can be done programmatically as follows.

this.numericUpDownExt1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Office2007;
this.numericUpDownExt1.ColorScheme = Syncfusion.Windows.Forms.Office2007Theme.Managed;
Office2007Colors.ApplyManagedColors(this, Color.Orange);
Me.numericUpDownExt1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Office2007
Me.numericUpDownExt1.ColorScheme = Syncfusion.Windows.Forms.Office2007Theme.Managed;
Office2007Colors.ApplyManagedColors(Me, Color.Orange)

Themes-and-Visual-Styles_img4

Office2016 theme

NumericUpDownExt control supports Office2016 Visual styles such as Office2016Colorful,Office2016White,Office2016Black and Office2016DarkGray.

//Sample code for setting “Office2016 Colorful” style for NumericUpDownExt

this.numericUpDownExt1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Office2016Colorful;
Me.numericUpDownExt1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Office2016Colorful;

Appearance-Settings_img4

NOTE

 The ThemesEnabled property should be set to ‘True’ for the above settings to take effect.

A sample which demonstrates the ThemesEnabled property and Office 2007 Visual Styles of TextBoxExt control is available in the below sample installation path.

…_My Documents\Syncfusion\EssentialStudio\Version Number\Windows\Tools.Windows\Samples\Advanced Editor Functions\ActionGroupingDemo_