Firstly before we get to start working with Toast prompt, We need to download Coding4Fun Toolkit from http://coding4fun.codeplex.com/. Later add Coding4Fun.Phone.Controls.dll as a reference for our newly created project.
Today, in this article let's learn another new concept related to window phone 7, whereby communicating with WCF Service to perform some operation.
Question: What is About Prompt?
In Simple Terms "It is used to display some message or notification to the user and enables user to accept the notification stating that user has been through the notification. So this type of prompt enables to intimate the user with some concise information".
Let's get this started off now!!!
Step 1: The Complete Code of IService1.cs looks like this:
|
using
System;
namespace
WCF_About_Application
[OperationContract]
[OperationContract]
[OperationContract]
[OperationContract] |
Step 2: The Complete Code of Service1.svc.cs looks like this:
|
using
System; namespace
WCF_About_Application
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 Web.Config looks like this:
<?xml version="1.0"?> <configuration>
<system.web> </configuration> |
Step 4: The Complete Code of MainPage.xaml looks like this:
<phone:PhoneApplicationPage
x:Class="AboutPromptApplication.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"
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-->
<!--TitlePanel contains the name of the
application and page title-->
<!--ContentPanel - place additional
content here-->
<!--Sample code showing usage of
ApplicationBar--> </phone:PhoneApplicationPage> |
Step 5: The Complete Code of MainPage.xaml.cs looks like this:
|
using
System; namespace
AboutPromptApplication
private void
add_AboutCall(object sender,
addCompletedEventArgs e)
private void
button1_Click(object sender,
RoutedEventArgs e)
private void
sub_AboutCall(object sender,
subCompletedEventArgs e)
private void
button2_Click(object sender,
RoutedEventArgs e)
private void
mul_AboutCall(object sender,
mulCompletedEventArgs e)
private void
button3_Click(object sender,
RoutedEventArgs e)
private void
div_AboutCall(object sender,
divCompletedEventArgs e)
private void
button4_Click(object sender,
RoutedEventArgs e)
#region
Instance Variable
|
Step 6: The Output of the Application looks like this:

Step 7: The Output of Nothing Entered Application looks like this:

Step 8: The Output of Addition Operation Application looks like this:

Step 9: The Output of Division Operation Application looks like this:

I hope this article is useful for you.

Arjun PanwarPosted Mar 16, 2012, 12:05 AM
Good Explanation...Vijay...Thanks for sharing