Bunifu Range
Quickly get a subrange of values with the range filter component for in-depth search and analysis.

Overview

Bunifu Range is a nifty .NET double slider control that allows the user to select a sub-range of values from a larger range of possible values. It also allows you to filter data by selecting a sub-range collection from a larger collection.

Getting Started

Adding Bunifu Range at Design Time

Bunifu Range is added to the form by simply locating BunifuRange in your toolbox and drag it to your form as shown below. You can then customize using custom properties as will be elaborated later in this article.

Adding Bunifu Range at Run Time

To add Bunifu range at run-time we will use the Load event handler to run the code that adds Bunifu Range to our form as shown below.
C#
VB.NET
1
private void Form1_Load(object sender, EventArgs e){
2
3
var range = new Bunifu.Framework.UI.BunifuRange();
4
this.Controls.Add(range);
5
6
}
Copied!
1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
2
3
Dim range As New Bunifu.Framework.UI.BunifuRange
4
Controls.Add(range);
5
6
End Sub
Copied!
Let's take a deep dive and get insights into the available properties on Bunifu Range.

Appearance Properties

BackgroundColor

This property allows you to get or set the background color of the range track. It supports the use of RGB or HEX color values.

BorderRadius

This property allows you to set the roundness of the range selector edges. The greater the value, the more rounded the selectors become.

IndicatorColor

This property enables you to get or set a color value of the minimum and maximum range selector indicators. It supports the use of RGB or HEX color values.

Value Properties

MaximumRange

This property allows you to get or set the total range of values the user can select. It accepts only integer values and has a default value of 100.

RangeMax

This property allows you to get or set the maximum value filter within the value set in the MaximumRange property.

RangeMin

This property allows you to set the minimum value filter within the total range value set in the MaximumRange property.

RangeChanged Event

The range changed event allows you to perform actions whenever the RangeMax and RangeMin properties are changed on the control. Here's a code snippet that sets the new value text to a label control whenever the RangeChanged event is raised.
C#
VB.NET
1
private void bunifuRange1_RangeChanged(object sender, EventArgs e)
2
{
3
bunifuLabel.Text = string.Format("${0} - ${1}", bunifuRange1.RangeMin, bunifuRange1.RangeMax);
4
}
Copied!
1
Private Sub bunifuRange1_RangeChanged(ByVal sender As Object, ByVal e As EventArgs)
2
bunifuLabel.Text = String.Format("${0} - ${1}", bunifuRange1.RangeMin, bunifuRange1.RangeMax)
3
End Sub
4
Copied!

Take Away

We hope you have gained insights into using Bunifu Range control and that it will help you create a better user experience for your users. It works out-of-the-box and is also customizable to suit the needs of your app.
Should you have feedback or suggestions please send us via chat on the bottom right corner of the screen.
Last modified 1mo ago