Today, in this article let's learn another new and wonderful concept related to Windows Phone 7, whereby communicating with WCF Service to perform some operation.
The Telerik Rad Controls for Windows Phone 7 can be downloaded from http://www.telerik.com/products/windows-phone.aspx.
The Rad Message Box is used to display the output in a nice and enhanced UI.
Question: What is RadUniformGrid?
In simple terms "The RadUniformGrid panel is a layout panel that allows for ordering items in rows and columns. You can specify the amount of rows and columns by using the NumberOfRows and NumberOfColumns properties. The RadUniformGrid also implies that each row and each column will have the same height/width."
Question: What is the difference between RadUniformGrid, Dock Panel and Wrap Panel?

Let's get this implemented practically for a better idea of this!!!
Step 1: The complete code of the IService1.cs looks like this:
using System; namespace WCF_Uniform_Grid [OperationContract] [OperationContract] [OperationContract] [OperationContract] |
Step 2: The complete code of the Service1.svc.cs looks like this:
|
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text; namespace WCF_Uniform_Grid public double sub(double a, double b) public double mul(double a, double b) public double div(double a, double b) |
Step 3: The complete code of the Web.Config looks like this:
<?xml version="1.0"?> <configuration> <system.web> </configuration> |
Step 4: The complete code of the MainPage.xaml looks like this:
<phone:PhoneApplicationPage
x:Class="RadUniform_Grid_Application_WP7.MainPage" <!--LayoutRoot is the root grid where all page content is placed--> <!--TitlePanel contains the name of the application and page title--> <!--ContentPanel - place additional content here--> <TextBox Height="72" <TextBlock Height="30" <TextBox Height="72" <TextBlock Height="30" <Button x:Name="btnAdd" <Button x:Name="btnSub" <Button x:Name="btnMul" <Button x:Name="btnDiv" </telerik:RadUniformGrid> </phone:PhoneApplicationPage> |
Step 5: The complete code of the MainPage.xaml.cs looks like this:
|
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.Primitives; using RadUniform_Grid_Application_WP7.ServiceReference1; using Telerik.Windows.Controls; namespace RadUniform_Grid_Application_WP7 } private void add_Call(object sender, addCompletedEventArgs e) private void btnAdd_Click(object sender, RoutedEventArgs e) } private void sub_Call(object sender, subCompletedEventArgs e) private void btnSub_Click(object sender, RoutedEventArgs e) } private void mul_Call(object sender, mulCompletedEventArgs e) private void btnMul_Click(object sender, RoutedEventArgs e) } private void div_Call(object sender, divCompletedEventArgs e) private void btnDiv_Click(object sender, RoutedEventArgs e) #region Instance Variables |
Step 6: The output of the application looks like this:

Step 7: The output of the Nothing Entered Application looks like this:

Step 8: The output of the Addition Operation Application looks like this:


Step 9: The output of the Division Operation Application looks like this:


I hope this article is useful for you.

Join the conversation! Your thoughts help the community grow.