Category / Section
How to customize the appearance of the WinForms GroupBar?
1 min read
Visual styles
The appearance of the GroupBar control can be customized by using the property, VisualStyle. The following code example demonstrates the same.
C#
//Sets the visual style. this.groupBar1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Metro; //Displays the GroupBar with flat look. this.groupBar1.FlatLook = true; //Sets the Fore color. this.groupBar1.ForeColor = Color.White; //Sets the back color. this.groupBar1.BackColor = Color.LightGray; //Sets the border style. this.groupBar1.BorderStyle = BorderStyle.FixedSingle; //Sets the border color. this.groupBar1.BorderColor = Color.White; //Sets the default visual style. this.groupBar1.VisualStyle = VisualStyle.Default; //Sets the Visual style as OffcieXP. this.groupBar1.VisualStyle = VisualStyle.OfficeXP; //Sets the Visual style as Office2003. this.groupBar1.VisualStyle = VisualStyle.Office2003; //Sets the Visual style as VS2005. this.groupBar1.VisualStyle = VisualStyle.VS2005; //Sets the Visual style as Office2007. this.groupBar1.VisualStyle = VisualStyle.Office2007; //Sets the Visual style as Office2010. this.groupBar1.VisualStyle = VisualStyle.Office2010; //Sets the Visual style as VS2010. this.groupBar1.VisualStyle = VisualStyle.VS2010; //Sets the Visual style as Metro. this.groupBar1.VisualStyle = VisualStyle.Metro; //Sets the Visual style as Office2007Outlook. this.groupBar1.VisualStyle = VisualStyle.Office2007Outlook;
VB
'Sets the visual style. Me.groupBar1.VisualStyle = Syncfusion.Windows.Forms.VisualStyle.Metro 'Displays the GroupBar with flat look. Me.groupBar1.FlatLook = True 'Sets the Fore color. Me.groupBar1.ForeColor = Color.White 'Sets the back color. Me.groupBar1.BackColor = Color.LightGray 'Sets the border style. Me.groupBar1.BorderStyle = BorderStyle.FixedSingle 'Sets the border color. Me.groupBar1.BorderColor = Color.White 'Sets the default visual style. Me.groupBar1.VisualStyle = VisualStyle.Default 'Sets the Visual style as OffcieXP. Me.groupBar1.VisualStyle = VisualStyle.OfficeXP 'Sets the Visual style as Office2003. Me.groupBar1.VisualStyle = VisualStyle.Office2003 'Sets the Visual style as VS2005. Me.groupBar1.VisualStyle = VisualStyle.VS2005 'Sets the Visual style as Office2007. Me.groupBar1.VisualStyle = VisualStyle.Office2007 'Sets the Visual style as Office2010. Me.groupBar1.VisualStyle = VisualStyle.Office2010 'Sets the Visual style as VS2010. Me.groupBar1.VisualStyle = VisualStyle.VS2010 'Sets the Visual style as Metro Me.groupBar1.VisualStyle = VisualStyle.Metro 'Sets the Visual style as Office2007Outlook. Me.groupBar1.VisualStyle = VisualStyle.Office2007Outlook
The following screenshot displays the customized GroupBar items.
Figure 1: Customized GroupBar items
Reference link: https://help.syncfusion.com/windowsforms/navigation-pane/visual-styles