How to add scrollbars in WinForms MetroForm?
Adding scrollbars in MetroForm
By default, WinForms
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;'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 Scrollbars added to the MetroForm as shown in
the screenshot below.
Samples:
C#: MetroForm_AutoScroll
Conclusion
I
hope you enjoyed learning how to add scrollbars in MetroForm.
Refer to our WinForms
MetroForm feature tour page for its other groundbreaking feature
representations. You can also explore our WinForms MetroForm documentation to understand how to
present and manipulate data.
For current customers, check out our WinForms components from the License and Downloads page.
If you are new to Syncfusion, try our 30-day free trial to
check out our WinForms MetroForm and other WinForms components.
Please let us know in the following comment section if you have any queries or require clarifications. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!