How to customize the WinForms ScrollersFrame appearance?
Customize the scrollersframe appearance
WinForms Scrollers Frame supports to customize the appearance using ScrollersFrame.CustomRender property. Following are steps to achieve,
- Create a class by inheriting from Interface named IRender.
- Implement the necessary functions in the class and draw each elements like Arrow, Scrollbar Background, Scrollbar thumb based on the requirement.
- Create an object for the custom renderer class and assign it to the ScrollersFrame.CustomRender property. This will apply custom render in ScrollersFrame.
C#
//To apply custom style this.scrollersFrame1.CustomRender = new CustomScrollersFrameStyle(true); (this.scrollersFrame1.CustomRender as CustomScrollersFrameStyle).ImageList = this.imageList1; /// <summary> /// Custom ScrollersFrame style /// </summary> public class CustomScrollersFrameStyle : IRenderer
VB
'To apply custom style Me.scrollersFrame1.CustomRender = New CustomScrollersFrameStyle(True) TryCast(Me.scrollersFrame1.CustomRender, CustomScrollersFrameStyle).ImageList = Me.imageList1 ''' <summary> ''' Custom ScrollersFrame style ''' </summary> Public Class CustomScrollersFrameStyle Implements IRenderer
Screenshot
Figure: ScrollersFrame Custom Appearance.
Samples:
VB: ScrollersFrameAppearanceVB
Conclusion
I hope you enjoyed learning about how to customize the WinForms Scrollers Frame appearance.
You can refer to our WinForms Scrollers Frame’s feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms Scrollers Frame documentation to understand how to present and manipulate data.
For current customers, you can check out our WinForms from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms Scrollers Frame and other WinForms components.
If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!