Getting Started
This tutorial will walk your through the creation of a sample application that contains RadCalculator and will show you how to:
Use RadCalculator in your project
Perform basic calculations
Perform more complicated calculations
For the purpose of this example, you will need to create an empty SilverlightApplication project and open it in Visual Studio.
- Assembly References
- Adding RadCalculator to the Project
- Performing basic calculations with RadCalculator
- Performing complex calculations with RadCalculator
Assembly References
In order to use RadCalculator in your projects, you have to add reference to the following assemblies:
- Telerik.Windows.Controls
- Telerik.Windows.Controls.Input
Adding RadCalculator to the Project
Example 1: Defining RadCalculator
<UserControl x:Class="RadCalculator.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:my="clr-namespace:RadCalculator"
mc:Ignorable="d" d:DesignHeight="700" d:DesignWidth="700">
<Grid x:Name="LayoutRoot" Background="White" >
<telerik:RadCalculator />
</Grid>
</UserControl>
Figure 1: Defining RadCalculator
Performing Basic Calculations with RadCalculator
RadCalculator allows you to perform all the basic calculations - addition, subtraction, multiplication, division. All of them can be executed either by the corresponding buttons or through the keyboard. Once a particular operation is executed, the history is updated accordingly:
Figure 2: Basic Calculations with RadCalculator
Performing Complex Calculations with RadCalculator
RadCalculator allows you to perform a couple of more complex calculations - square root, reciprocal, percent, negate. All of them can be executed either by the corresponding buttons or through the keyboard. Once a particular operation is executed, the history is updated accordingly: