)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add scrollbars in WinForms MetroForm?

Platform: WinForms |
Control: MetroForm |
Published Date: June 21, 2018 |
Last Revised Date: January 6, 2020 |
.NET Framework: 4

Adding scrollbars in MetroForm

By default, MetroForm don’t have any scroll bar. But we can add scroll bar in MetroForm by the help of Panel. Here we have used the ScrollersFrame in Panel to show the scroll bar and apply the metro style. The following code demonstrates the same.

C#

//Initialize ScrollersFrame
ScrollersFrame frame = new ScrollersFrame();
 
//Enable ScrollBar to the container
frame.AttachedTo = this.panel1;
 
//Set ScrollersFrame Visual Style
frame.VisualStyle = ScrollBarCustomDrawStyles.Metro;
 
//Enable AutoScroll property
this.panel1.AutoScroll = true;

VB

'Initialize ScrollersFrame
Dim frame As New ScrollersFrame()
 
'Enable ScrollBar to the container
frame.AttachedTo = Me.panel1
 
'Set ScrollersFrame Visual Style
frame.VisualStyle = ScrollBarCustomDrawStyles.Metro
 
'Enable AutoScroll property
Me.panel1.AutoScroll = True

 

Screenshot

Show the scrollbars in MetroForm

Samples:

C#:  MetroForm_AutoScroll

VB:  MetroForm_AutoScroll

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon