Getting Started

This tutorial will walk you through the required steps for using RadDataBar.

Assembly References

In order to add RadDataBar in your application, you need to add references to the following assemblies:

  • Telerik.Windows.Controls.DataVisualization
  • Telerik.Windows.Data

Adding RadDataBar to the Project

Example 1: Defining RadDataBar Declaratively

     <telerik:RadDataBar Height="30"  
                        BorderBrush="Gray" 
                        BorderThickness="1"/> 

Figure 1: Adding RadDataBar

Adding RadDataBar

By default the Value property of the control will have a value of 0. It can be bound to a property of the business model so the required data is displayed. This is covered in details in the Data Binding topic.

Displaying collection of Bars

RadDataBar is intended to display a single value. When you need to display a collection of values, you can use the RadStackedDataBar and RadStacked100DataBar controls. They will both generate a bar for each value present in its ItemsSource.

The difference between the controls is how the sizes of the bars are calculated. The size of each bar in the RadStackedDataBar is calculated in accordance to the set Minimum and Maximum. On the other hand, each bar's size in the RadStacked100DataBar corresponds to the percent of the bar's value compared to the sum of all values in the stack.

More information can be found in the Data Binding article.

See Also

In this article
Not finding the help you need? Improve this article