What are Performance Testing and Load Testing?

See How Telerik Test Studio helps in Load Testing

See How Telerik Test Studio helps in Performance Testing

image

Performance Testing

Performance Testing is being performed to measure smoothness and readiness of the application. While creating an application the vital factors should be kept in mind are as follows

  • Speed of the application at any given condition
  • Response time of the application
  • How much resources being used by the application
  • How stable is the application at given time
  • Throughput of the application
  • For web application times spent in making HTTP calls at server and client etc.

Performance Testing is type of testing that test application on above listed criteria.

image

Performance Testing measures performance of the application. After measuring performance of the application it sets the base line for further testing. Performance testing is very important since cooperate prestige of the application or decision on the final release of application based on the analysis of the results produced by this test. Performance testing does not find any defect in the application. Often, we perform Performance testing on a stable system.

Performance Test finds performance issue in the

  • Database access
  • Network latency like time spent on the network
  • Time spent on reading or writing files on the disc
  • Time spent on making HTTP calls etc.

So we can summarize Performance testing

image

Load Testing

Load Testing determines user experience when application is under load. In Load Testing, we test application with maximum number of users or with the expected number of users in the production environment.

image

 

Load Testing determines upper limit of the application. Load testing simulates expected number of users from the production environment and tests the application with that number of users. When we exceed number of users to test the application much beyond expected number of users from production environment then we call testing as STRESS TESTING. In majority of the time we consider Stress Testing as Load Testing.

Purpose of Load Testing is to find defect in the application when application is running under maximum load. Some of the defects could be as follows

  • Memory leak
  • Buffer Overflow
  • Server failure
  • Network failure
  • Input devices reading failure
  • Writing on output device failure etc.

We can summarize that Load Testing tests application behavior and sustainability with the maximum number of user inputs.

Make sure you have enabled Test Studio Add-ons in Firefox before executing test

I was trying to execute a functional test in Firefox browser. For that I selected FF and clicked on Run to execute the functional test in Firefox browser.

clip_image001

However while executing the test, I got this message and Test Studio was kept waiting for the browser to respond.

clip_image002

After investigation I found that in Add-ons of Firefox, Telerik Testing Framework Add-ons was not enabled.

clip_image004

Make sure to enable both the Add-ons and you will be able to execute the function test in Firefox.

clip_image006

After enabling that you should able to execute a function test in Firefox browser.

Setting up environment for Load Testing in Test Studio

In this post we will follow step by step approach to setup environment for Load Testing in Test Studio. Very first go to Program ->Telerik ->Test Execution and open Configure Load Test Services

clip_image001

Next you will get dialog box to configure the services.

clip_image002

In this dialog box you need to make sure that all the services are started and most importantly make sure that you have given correct database instance name in the Reporter Database Connection setting

clip_image003

In above case kumar is the database server name running on my machine. So I provided instance name kumar\sqlexpress. You do not need to create TestStudioReportingDB database manually. Test Studio will create this database in given database server. After making sure all the information is provided correctly click on Ok to restart all the services.

Next open Test Studio and create a test of type Load Test. Very first you will get following screen

clip_image005

Click on Okay and from the ribbon click on Manage

clip_image006

Here you got an option to Add Controller and manage the number of Virtual users. To Add Controller click on Add Controller button

clip_image007

In Add Controller dialog box give the name of the computer or IP of the computer you want to set as controller and click on Test Connection. After successful connection click on the Add button to add a controller

clip_image008

On the successful adding of controller you need to set the number of Virtual Users for the Controller as following. We have added 258 virtual users in this controller

clip_image009

Next we need to set Controller and Reporter. Select the computer from drop down and click on the connect button.

clip_image010

After successful connect you can see green signals beside Controllers, Reporters and Agents.

clip_image011

All three green signals imply that environment for load testing in Test Studio has setup successfully. Now you can go to design and create ass cases to perform Load Testing

Download Slides and Source Codes from Rad Controls for Windows Phone Webinar

Download Resources of the webinar from here

Thank you so much for attending Webinar: Telerik Tools for Ninja Developers: RadControls fot Windows Phone . I hope it was useful. If you have not done it yet then I strongly recommend you to download free trial and start playing around Rad Controls for Windows Phone. You will find more resources at below given links

Download trial from here

Demos on Rad Controls

Resources on Rad Controls for Windows Phone

Documentation on Rad Controls for Windows Phone

Forum for Rad Controls for Windows Phone

In webinar we started from downloading and installing of Rad Controls. We did walkthrough of all popular Rad Controls and discussed in detail about

  • RadConversationView control
  • RadCalendar control
  • RadSlideView control
  • RadAutoComplete control

Download Resources of the webinar from here

If you need more information and any assistance then please feel free to get connected with me at @debug_mode or send me mail on Dhananjay.kumar@telerik.com . Thanks once again for attending the webinar.

Appreciate Telerik products? Vote for us

2012 DevPro Community Choice Awards

Windows ITPro Community Choice Awards

Closing date of voting: September 28

Telerik has been working hard to help you in “DELIVERING MORE THAN EXPECTED “. Due to our work and love, we manage to create a semantic and purposeful relationship between you and us. Whether you are a developer, tester, IT pro or a manger our products help you to perform your task more effectively and quickly. We have products for all steps of development process. We are committed to make our products better in order to serve you better.

 

Today we have come to you with a request. If you love and appreciate our products then please vote for us. Vote for us in DevPro and ITPro community choice award. Our products are nominated in 25 different categories. Find details about award at links given below,

2012 DevPro Community Choice Awards

Windows ITPro Community Choice Awards

 

For DevPro our products are nominated in following categories

Category

Products

Best Add-In Product

Telerik JustCode

Best Charting and Graphics Tool Product

Telerik RadChart for ASP.NET AJAX

Best Component Set

Telerik DevCraft Ultimate

Best Content Management System

Sitefinity

Best e-Commerce Package

Sitefinity Ecommerce

Best Email Control Product

Sitefinity Email Campaigns

Best Forum Application

Sitefinity Forums

Best Grid Product

Telerik RadGrid for ASP.NET AJAX

Best Memory Management/Profiling Product

Telerik JustTrace

Best Navigation Control Product

Telerik RadMenu for ASP.NET AJAX

Best Online Editor

Telerik RadEditor for ASP.NET AJAX

Best Printing/Reporting Tool

Telerik Reporting

Best Project Management/Defect Tracking Product

Telerik TeamPulse

Best Scheduling/Calendar Tool

Telerik RadScheduler for ASP.NET AJAX

Best SharePoint Development Tool

Telerik RadControls for ASP.NET AJAX

Best Silverlight Product

Telerik RadControls for Silverlight

Best Testing/QA Tool

Telerik Test Studio

Best Training Product or Book

Telerik Training

Best Utility

Telerik JustDecompile

Best Free Tool

Telerik JustDecompile

Best Vendor Support

Telerik

 

 

For ITPro our products are nominated in following categories

Category

Products

Best Management Suite

Telerik TeamPulse

Best SharePoint Product

Telerik RadControls for ASP .NET AJAX

Best Free Tool

Telerik JustDecompile

Best Vendor Tech Support

Telerik

 

We appreciate your support. Looking forward for prolong relationship with you. Thanks for voting for us.

Webinar: Telerik Tools for Ninja Developers: RadControls for Windows Phone

 

Date: 5th Sep 2012

Time: 3:00 pm to 4:00 pm (IST)

Register here to attend the webinar

Any query mail me @ Dhananjay.kumar@telerik.com

Telerik India has started a webinar series in India time zone to create more awareness about Telerik products. So far four webinars have been conducted and large numbers of developers, designers and testers got benefited by that.

Find full schedule of the webinars here

Continuing the series, on 5th September 2012, we are conducing webinar on Rad Controls for Windows Phone to help Windows Phone developer community.

image

Windows Phone application development is keeping a lot of developers very busy. Developers have the envious task of creating quality Windows Phone Application in short span of time. Telerik RadControls for Windows Phone provide the set of controls that significantly speed up the Windows Phone App Development process.

Find more about RadControls for Windows Phone here

Register here to attend the webinar

In this webinar we will start with Rad Controls for Windows Phone. We will explore various Rad Controls. We will keep webinar demo oriented and we will more focus on writing and understanding codes. I strongly recommend you to download and install trial before coming to webinar.

RadControls for Windows Phone provides you 41 different controls and building blocks to cut your development time. These controls are designed to shorten your app development time. We will explore some of the controls listed below in the webinar.

  • RadConversationView
  • RadAutoCompleteBox
  • RadTextBox
  • RadToggleSwitch
  • RadSlideHubTiles
  • RadRating
  • RadHubTiles etc .

Apart from above listed RadControls, we will explore many other controls as well. I request you to attend the webinar. Once again find the webinar details below,

Date: 5th Sep 2012

Time: 3:00 pm to 4:00 pm (IST)

Register here to attend the webinar

See you in the webinar. If you have any question or query , please feel free to send me mail at Dhananjay.kumar@telerik.com

Updating Count Value of RadHubTile in using BackGroundWorker

While working on one of the application, I came across a requirement to keep updating count value of RadHubTile in Windows Phone. I had RadHubTile declared on XAML as following

 


<telerikPrimitives:RadHubTile Title="News"
ImageSource="Images\news.png"
Count="11"
Message="News Update"
Width="400"
x:Name="newshubtile">
<telerikPrimitives:RadHubTile.BackContent>
<Border Background="{StaticResource PhoneAccentBrush}">
<TextBlock HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="News mashup!!"/>
</Border>
</telerikPrimitives:RadHubTile.BackContent>
</telerikPrimitives:RadHubTile>

If you notice in above declaration, we have set value initial of Count Property to 11. Now we need to update value of count on different thread. We can do that using BackGroundWoker. Suppose we have function to update count value as following

 


private void increaseCountValue()
{

newshubtile.Count = newshubtile.Count + 2;

}

Now we need to execute this function in BackgroundWoker. In below function, we are passing two input parameters

  1. Function as Action
  2. Delay in msecond

We are creating instance of BackgroundWorker and calling the function asynchronously on different thread than UI thread.


private void UpdateUsingBackgroundWoker(Action updateMethod, int delayInMilliseconds)
{
BackgroundWorker worker = new BackgroundWorker();
worker.DoWork += (s, e) => Thread.Sleep(delayInMilliseconds);
worker.RunWorkerCompleted += (s, e) => updateMethod.Invoke();
worker.RunWorkerAsync();

}

Last but not least we need to call UpdateIUsingBackgroundEWorker as per our requirement. We can call this as following


this.UpdateUsingBackgroundWoker(() => increaseCountValue(), 1000);

This will update count value in delay of 1 second. In this way you can update count value. I hope you find this post useful. Thanks for reading!

Start working with RadRating control for Windows Phone in three simple steps

Read more here

As name suggests by using RadRating controls, you can allow your application user to rate something. RadRating control allows user to select a value from set of rating items. RadRating control may give immersive experience as given below.

image

In this post we will follow three steps to start working with RadRating control.

Step 1

Start with adding namespace on xaml

image

Step 2

You can add a RadRating control by declaring it on xaml as following. You need to set value of AutoGeneratedItemsCount property to set number of rating items.

image

Expected output of above declaration should be as following

image

If you want you can change geometrical shape of the rating items as well. You need to set value of ItemShapeStyle property.There are five geometric shapes are provided. They are as following

  1. Stars1
  2. Stars2
  3. Hearts1
  4. Hearts2
  5. Hearts3

You can set Height and Width of the Rating Item using ItemShapeHeight and ItemShapeWidth property respectively.

In below declaration we are setting shape style, shape height and shape width.

image

Expected output of above RadRating control declaration is as following

image

If you want you can customize individual rating item also. You can do that as following. You may have content for each individual rating item.

image

Expected output of above RadRating control declaration is as following

image

Step 3

In last step you may want to handle events to perform operation when user is changing the rating. Below two events are important to track when user is changing rating or rating has been changed already.

  • ValueChanged
  • ValueChanging

You can handle ValueChanged event as following. In this event you get both old value and new value from the RadRating control

image

Conclusion

These are three simple steps you required to start working with RadRating control. Below I am consolidating codes from above discussion

MainPage.xaml

 


<phone:PhoneApplicationPage
x:Class="processapp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait"  Orientation="Portrait"
shell:SystemTray.IsVisible="True">

<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="Demo App" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="rating control" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>

<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<StackPanel Orientation="Vertical" Grid.Row="0">
<telerikInput:RadRating x:Name="rdRatingControl"
AutoGeneratedItemsCount="5" />
<TextBlock x:Name="txtrating1" Style="{StaticResource PhoneTextNormalStyle}" />
</StackPanel>

<StackPanel Orientation="Vertical" Grid.Row="1">

<telerikInput:RadRating x:Name="rdRatingControl1"
AutoGeneratedItemsCount="5"
ItemShapeStyle="Hearts1"
ItemShapeHeight="60"
ItemShapeWidth="70"
/>
<TextBlock x:Name="txtrating2" Style="{StaticResource PhoneTextNormalStyle}" />

</StackPanel>
<StackPanel Orientation="Vertical" Grid.Row="2" >
<telerikInput:RadRating  x:Name="rdRating" >
<telerikInput:RadRatingItem Content="poor "/>
<telerikInput:RadRatingItem Content="satisfied "/>
<telerikInput:RadRatingItem Content="good "/>
<telerikInput:RadRatingItem Content="verygood "/>
<telerikInput:RadRatingItem Content="excelent"/>
</telerikInput:RadRating>
<TextBlock x:Name="txtrating3" Style="{StaticResource PhoneTextNormalStyle}" />
</StackPanel>

</Grid>
</Grid>

</phone:PhoneApplicationPage>

MainPage.xaml.cs

 


using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Telerik.Windows.Controls;

namespace processapp
{
public partial class MainPage : PhoneApplicationPage
{
// Constructor
public MainPage()
{
InitializeComponent();
rdRating.ValueChanged += new EventHandler<ValueChangedEventArgs<object>>(rdRating_ValueChanged);
rdRatingControl.ValueChanged += new EventHandler<ValueChangedEventArgs<object>>(rdRatingControl_ValueChanged);
rdRatingControl1.ValueChanged += new EventHandler<ValueChangedEventArgs<object>>(rdRatingControl1_ValueChanged);

}

void rdRatingControl1_ValueChanged(object sender, ValueChangedEventArgs<object> e)
{
var oldValue = e.OldValue;
var newValue = e.NewValue;
string message = "you have changed value from " + oldValue + "to " + newValue;
txtrating2.Text = message;
}

void rdRating_ValueChanged(object sender, ValueChangedEventArgs<object> e)
{
var oldValue = e.OldValue;
var newValue = e.NewValue;
string message = "you have changed value from " + oldValue + "to " + newValue;
txtrating3.Text = message;
}

void rdRatingControl_ValueChanged(object sender, ValueChangedEventArgs<object> e)
{

var oldValue = e.OldValue;
var newValue = e.NewValue;
string message = "you have changed value from " + oldValue + "to " + newValue;
txtrating1.Text = message;
}

}
}

When you run application you should have application with RadRating control as following

clip_image002

I hope you find this post useful. Thanks for reading.

Three simple steps to start working with RadToggleSwitch for Windows Phone

In this post we will learn to use RadToggleSwitch in three simple steps. RadToggleSwitch controls gives you experience of on and off button. It is a binary state control and can be either in state of on or off. You may get experience of RadToggleSwitch as following

image

Follow the below steps to start working with RadToggleSwitch. This control is very much configurable and you can put button and header styling as per your application requirement.

Step1

Very first you need to add reference of Telerik.Windows.Controls.Primptive on xaml.

image

Step 2

After adding namespace add RadToggleSwitch on the application page. You can add that as following

image

While adding RadToggleSwitch we can configure value of header. If needed, you can define HeaderStyle and HeaderTemplate specific to your application. By default accent color of device get applied as background color of RadToggleSwitch. You can set IsChecked property to either true or false. If you do not set it then it takes default value false. One important property is ButtonStyle. You can configure this property to give different look to toggle button.

Below is the consolidated code. On the xaml we have put four RadToggleSwitch control.


<phone:PhoneApplicationPage
x:Class="processapp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait"  Orientation="Portrait"
shell:SystemTray.IsVisible="True">

<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="Demo App" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="toggle switch" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>

<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<telerikPrimitives:RadToggleSwitch
x:Name="tglWifi"
Header="WiFi"
Grid.Row="0"
/>
<telerikPrimitives:RadToggleSwitch
x:Name="tglBlueTooth"
Header="BlueTooth"
Grid.Row="1"
IsChecked="True"/>

<telerikPrimitives:RadToggleSwitch
x:Name="tglDataNetwrok"
Header="Cellular Data"
Grid.Row="2"
IsChecked="True"/>

<telerikPrimitives:RadToggleSwitch
x:Name="tglSharing"
Header="Sharing"
Grid.Row="3"
IsChecked="False"/>

</Grid>
</Grid>

</phone:PhoneApplicationPage>

Step 3

You can handle check and uncheck event on RadToggleSwitch. You can perform operation corresponding to on in check event and corresponding to off in uncheck event. For example in below code I am changing header of the RadToggleSwitch in check and uncheck event

image

And we have attached the event to RadToggleSwitch in constructor of the page as given below,

image

Output

When you run above application you should get expected output as following. When you toggle Data Sharing button, you will notice header is getting changed.

image

In this way you can work with RadToggleSwitch. I hope you find this post useful. Thanks for reading.

Working with RadSlideHubTile for Windows Phone

In this post we will learn working with RadSlideHubTile. This control allows you to have Windows Phone home screen tile experience inside your application. This tile is used to display information with image. You can associate tap or doubletap event with individual slide hub tile to perform specific operation. To have better immersive experience put RadSlideHubTile in a RadUniformGrid. At the end of this post we are going to have RadSlideHubTile in application as following image

image

To start with add Telerik.Windows.Controls.Primtives namespace on the xaml.

image

After adding namespace put a RadUniformGrid on the application page. We are creating uniform Grid of 3 rows and 3 columns.

image

Inside the Grid we will put RadSlideHubTiles. Since grid is of 3 rows and 3 columns, so we can put 9 RadSlideHubTiles.

We can create a RadSlideHubTiles as following

image

We need to provide Title and Picture values to create RadSlideHubTiles. We can see that Title property is set to India and Picture property is set an image url. We can put 9 RadSlideHubTiles in the grid. We can put that as following


<phone:PhoneApplicationPage
x:Class="processapp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait"  Orientation="Portrait"
shell:SystemTray.IsVisible="True">

<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="BROWSE COUNTRY APP" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="countries" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>

<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">

<telerikPrimitives:RadUniformGrid NumberOfColumns="3" NumberOfRows="3">
<telerikPrimitives:RadSlideHubTile x:Name="hbIndia"
Title="India"
>
<telerikPrimitives:RadSlideHubTile.Picture>
<Image Source="Images\indiaflag.jpg"
Stretch="Fill"/>
</telerikPrimitives:RadSlideHubTile.Picture>
</telerikPrimitives:RadSlideHubTile>
<telerikPrimitives:RadSlideHubTile x:Name="hbFrance"
Title="France"
>
<telerikPrimitives:RadSlideHubTile.Picture>
<Image Source="Images\franceflag.jpg"
Stretch="Fill"/>
</telerikPrimitives:RadSlideHubTile.Picture>
</telerikPrimitives:RadSlideHubTile>
<telerikPrimitives:RadSlideHubTile x:Name="hbEngland"
Title="England"
Tap="hbTextBox_Tap">
<telerikPrimitives:RadSlideHubTile.Picture>
<Image Source="Images\englandflag.jpg"
Stretch="Fill"/>
</telerikPrimitives:RadSlideHubTile.Picture>
</telerikPrimitives:RadSlideHubTile>
<telerikPrimitives:RadSlideHubTile x:Name="hbGermany"
Title="Germany">
<telerikPrimitives:RadSlideHubTile.Picture>
<Image Source="Images\germanyflag.jpg"
Stretch="Fill"/>
</telerikPrimitives:RadSlideHubTile.Picture>
</telerikPrimitives:RadSlideHubTile>
<telerikPrimitives:RadSlideHubTile x:Name="hbAustralia"
Title="Australia">
<telerikPrimitives:RadSlideHubTile.Picture>
<Image Source="Images\ausflag.jpg"
Stretch="Fill"/>
</telerikPrimitives:RadSlideHubTile.Picture>
</telerikPrimitives:RadSlideHubTile>
<telerikPrimitives:RadSlideHubTile x:Name="hbChina"
Title="China">
<telerikPrimitives:RadSlideHubTile.Picture>
<Image Source="Images\chinaflag.jpg"
Stretch="Fill"/>
</telerikPrimitives:RadSlideHubTile.Picture>
</telerikPrimitives:RadSlideHubTile>
<telerikPrimitives:RadSlideHubTile x:Name="hbJapana"
Title="Japan">
<telerikPrimitives:RadSlideHubTile.Picture>
<Image Source="Images\japanflag.jpg"
Stretch="Fill"/>
</telerikPrimitives:RadSlideHubTile.Picture>
</telerikPrimitives:RadSlideHubTile>
<telerikPrimitives:RadSlideHubTile x:Name="hbBrazil"
Title="Brazil">
<telerikPrimitives:RadSlideHubTile.Picture>
<Image Source="Images\brazilflag.jpg"
Stretch="Fill"/>
</telerikPrimitives:RadSlideHubTile.Picture>
</telerikPrimitives:RadSlideHubTile>
<telerikPrimitives:RadSlideHubTile x:Name="hbUSA"
Title="USA">
<telerikPrimitives:RadSlideHubTile.Picture>
<Image Source="Images\usaflag.jpg"
Stretch="Fill"/>
</telerikPrimitives:RadSlideHubTile.Picture>
</telerikPrimitives:RadSlideHubTile>

</telerikPrimitives:RadUniformGrid>
</Grid>
</Grid>

</phone:PhoneApplicationPage>

When you run the application you should get tiles inside your application and you can handle tap or doubletap event to perform specific task on the particular RadSlideHubTile. Expected output of your application is as following

image

In this way you can work with RadSlideHubTile. I hope you find this post useful. Thanks for reading.

How to work with RadTextBox for Windows Phone

Read documentation here

RadTextBox is adding below functionalities in usual TextBox. Those functionalities are

  • Watermark
  • Validation
  • Clear Button
  • Action Button
  • Headers

You may have immersive experience of a RadTextBox as following

image

To start working with RadTextBox very first you need to add namespace on XAML as following

image

After adding namespace you need to put RadTextBox on xaml. Explicitly you need to set ActionButtonVisibility property as visible.

image

Clear button will only be visible once you start typing the text. ActionButtonTap event gets called when action button gets tapped. You can set watermark as following

image

On running you should get RadTextBox as below

image

If you want you can change style of clear and action button. Header of the RadTextBox can bind to a data source as following

image

And in the code behind

image

And Data class is defined as following

image

You should be getting RadTextBox experience as following. You will notice that header has been data bind now.

image

One of the most important features of RadTextBox is validation capabilities. You may want to perform some validation on the lost focus. To start with validation you need to add namespace

image

ValidationState enum is used to specify validation state on RadTextBox. There are four possible value of ValidationState

image

You can validate as following

image

Validate is user defined function and you may defined it as per your business requirement. Validation message will be displayed as following

image

image

In this way you can work with RadTextBox. Below is the consolidated code of all discussion from this post

MainPage.xaml


<phone:PhoneApplicationPage
x:Class="Demo.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
xmlns:telerikSlideView="clr-namespace:Telerik.Windows.Controls.SlideView;assembly=Telerik.Windows.Controls.Primitives"
xmlns:telerikData="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Data"
xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
xmlns:telerikDataVisualization="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.DataVisualization"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait"  Orientation="Portrait"
shell:SystemTray.IsVisible="True">

<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="DEMO RAD CONTROLS" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="Autocomplete" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>

<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">

<telerikPrimitives:RadTextBox x:Name="rdTextBox" Height="110"
ActionButtonVisibility="Visible"
Header="{Binding Name}"
Watermark="Search"
ActionButtonTap="RadTextBox_ActionButtonTap"
/>

</Grid>
</Grid>

</phone:PhoneApplicationPage>

MainPage.xaml.cs

 

</pre>
using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Net;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Documents;
 using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Media.Animation;
 using System.Windows.Shapes;
 using Microsoft.Phone.Controls;
 using System.Collections.ObjectModel;
 using Telerik.Windows.Controls;
 using System.Windows.Media.Imaging;
 using System.Xml.Linq;
 using Telerik.Windows.Controls.PhoneTextBox;

namespace Demo
 {
 public partial class MainPage : PhoneApplicationPage
 {

public MainPage()
 {
 InitializeComponent();
 this.rdTextBox.DataContext = new Data { Name = "I am  data bind Header" };
 rdTextBox.LostFocus += new RoutedEventHandler(rdTextBox_LostFocus);

}

void rdTextBox_LostFocus(object sender, RoutedEventArgs e)
 {

bool isValid = Validate(rdTextBox.Text);
 if (isValid)
 {
 rdTextBox.ChangeValidationState(ValidationState.Valid, "Wow valid input!");
 }
 else
 {
 rdTextBox.ChangeValidationState(ValidationState.Invalid, "Oops InValid input!");
 }

}

private bool Validate(string text)
 {
 //Your validation logic
 return false;
 }

private void RadTextBox_ActionButtonTap(object sender, EventArgs e)
 {

MessageBox.Show("Hello");

}

}
 public  class Data
 {
 public string Name { get; set; }
 }

}

&nbsp;
<pre>

I hope you find this post useful. Thanks for reading.