Introduction



Home Screen :

Name of Experiment : Hello World

Exp No : MC1

Background : Student should require a basic knowledge of VB or C#.

Summary : After performing, this experiment student should be able to understand the proper flow of development of WP7 application by writing the program, debugging and deploying it on the emulator or target device.

Learning Objective : To explain the working of WP7 by writing Hello World Program.

Target

Target Platform : This application is tested on Windows Phone Emulator and Windows Phone (Lumia 800).

Procedure

SourceCode

Source Code : Comments :
MainPage.xaml.cs
using System.Windows;
using Microsoft.Phone.Controls;
namespace Hello_World
{ public partial class MainPage : PhoneApplicationPage
{
// Constructor
public MainPage()
{
InitializeComponent();
}
}
}





 Using Microsoft.Phone.Controls

MainPage.xaml
<!--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="Home Screen" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="Welcome Page" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>



 Text fields "Home Screen"

 Text field "Welcome Page"
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<TextBlock Height="60" HorizontalAlignment="Left" Margin="141,75,0,0" Name="textBlock1" Text="Hello World"
VerticalAlignment="Top" Width="163" />
</Grid>
</Grid>




 Using Hello World

Snapshots







Observation

Observation : It should be noted by developer that for any kind of WP7 application, steps (1-6) need to be repeated.

Video Link

For Windows Phone

Download

Right Click Here And Select Save Target For Entire Download :

Hello World Experiment