This tutorial will walk your through the creation of a sample application that contains RadCalculator and will show you how:

• 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.

• Create a new Silverlight project;

• Add references to the assemblies Telerik.Windows.Controls and Telerik.Windows.Controls.Input;

#### XAML

``````<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"
mc:Ignorable="d" d:DesignHeight="700" d:DesignWidth="700">

<Grid x:Name="LayoutRoot" Background="White" >
</Grid>
</UserControl>
``````

Two lines of code are important here:

• The import of the Telerik schema:

#### XAML

``````xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
``````
• The declaration of the RadCalculator control inside the Grid:

#### XAML

``````<telerik:RadCalculator />
``````

Now if you run the application, you have RadCalculator:

## Perform basic calculation with RadCalculator

RadCalculator allows you to perform all the basic calculations - addition, subtraction, multiplication, division. All of them can be executed either by its corresponding buttons or through the keyboard. Once a particular operation is executed, the history is updated accordingly:

## Perform complex calculation with RadCalculator

RadCalculator allows you to perform a couple of more complex calculations - square root, reciplorcal, percent, negate. All of them can be executed either by its corresponding buttons. Once a particular operation is executed, the history is updated accordingly: