Bunifu ScrollBars is a control-set consisting of the vertical and horizontal scroll bars, which I'd say is very essential if you wish to go a mile further in building better designs for your applications. It basically allows you to have customizable scroll bars for use when scrolling through container controls such as Panels, Flow Layout Panels, Data Grids, and other third-party controls. With it, you can style the thumb (which we'll talk about shortly), the scroll bar's background, provide animations during scroll, attach the scroll bars to any container control, and everything else that comes with the standard Windows Forms scroll bars.
Here are some sample previews of the vertical scroll bar in action:
Let's now jump right into the features!
The one question that users ask when it comes to custom scroll bars is one: How will I integrate this scroll bar with a Panel? (or a FlowLayoutPanel, Custom Control)
And well, that's the right question to ask! Bunifu ScrollBars provide binding support for the major container controls, including:
Flow Layout Panels.
Data Grid Views.
All other third-party scrollable containers.
Using the property
BindingContainer , Bunifu ScrollBars can blend easily with container controls, allowing users to scroll through items just as they do with the standard windows scroll bars.
Here's an example from the Todo application posted before where a Panel was bound to a vertical scroll bar:
From the example, you notice that items have already been added to the Panel, then the Panel is bound to the vertical scroll bar. Once a container is bound to any Bunifu ScrollBar, every activity involving items, be it adding or removing them, automatically updates the scroll bars with the necessary size and value changes, be it that you're working via code or manually. This works for both the vertical and horizontal scroll bars.
Here's an example:
Here's another example from the DataGridView sample where the DataGridView was bound to a vertical scroll bar:
We'll now take a look at binding a Flow Layout Panel and later on go through some of the methods you can use to bind containers using code.
Just like with a normal Panel, Bunifu ScrollBars can easily bind with a FlowLayoutPanel or any other custom container controls implementing it's interface:
Now, let's look at the available methods and property you can use in code:
BindTo(ScrollableControl scrollableControl) : This method allows you to bind any scrollable container control with a Bunifu vertical or horizontal scroll bar.
BindTo(DataGridView dataGridView, bool allowSelection) This method allows you to bind any DataGridView control to a Bunifu vertical or horizontal scroll bar.
BindingContainer : This property acts as a shorthand option for the above methods, allowing you to bind any supported container control to a Bunifu vertical or horizontal scroll bar.
Scrolling using Bunifu ScrollBars has been made smooth and direct at the same time. Let's discuss the various scroll options provided.
You can provide cursor changes when scrolling using the property
Animations is one of the most wanted features in our controls suite, and so we've made it possible simply by enabling the property
Scroll Keys Detection
As one of the core features with scrolling, Bunifu ScrollBars provides scrolling using the standard Arrow Keys, that is: top, bottom, left, right. This is enabled by setting the
true . This also supports the PageUp and PageDown keys. Likewise, to use the Home and End keys for scrolling, simply set the property
true . This lets you to move from one end of the range to another (that is,
Minimum and vice-versa):
Scroll Options Menu
By default, Bunifu ScrollBars come integrated with a custom Scroll Options Menu which allows you and your users to navigate through any container control. You can either enable or disable it by setting the property
Shrinking When Inactive
Another neat feature we've integrated with Bunifu ScrollBars is the ability to shrink the scroll bars whenever they're inactive using the property
AllowShrinkingOnFocusLost . This means that the scroll bars will shrink to a specified value when not in use and auto-grow when in use. You can set the shrink-size limit using the property
ShrinkSizeLimit which accepts an integer value.
Here's an example:
Currently, this feature will only be active whenever the
BorderRadius is set to
1 . We will be working on including it also with curved scroll bars, so don't you worry...
As with all other Bunifu UI controls, you can fully customize Bunifu ScrollBars to meet your needs. From setting a custom border radius and thickness, to applying various colors and more, you're never limited in coming up with good designs.
Border & Background Options
You can customize a scroll bar's border and background by changing its
Thumb Options With the thumb (mover) comes some few main customization options. They include:
Thumb Margin: This refers to the distance between the thumb and the scroll bar's edges. This allows you to set a specified distance between the scroll bar's edges and the thumb:
Thumb Style: This provide some styling options for the thumb. They are
Inset which means that the thumb will be within the scroll bar, and
Proportional which means that the thumb will be equal in size to the scroll bar:
You can also change the thumb's length using the
ThumbLength property. This however is only available via code and therefore not in the Properties window:
bunifuVScrollBar1.ThumbLength = 40;
As you may have noticed, whenever the thumb is hovered or pressed, it lightens or darkens. This is because the properties
AllowMouseDownEffects are enabled:
That's it! We've covered most of the major features included in Bunifu ScrollBars. But guess what... there's even more in these two controls than we've covered, and well, that's where you come-in and see what's packed within Bunifu ScrollBars!
Scroll bars have been one of the greatest needs for most Windows developers to override and style to their liking, and we believe that with the ton of work we've put into them can help you go that extra mile by providing customized scroll bars for all container controls with item collections. Therefore we urge you to go ahead and replace those old Windows ScrollBars with Bunifu's and taste the difference.