Windows Phone Development For Beginners - Part 1

Here's Part 1 of this series. Before starting with the development process, I'll explain the basics of Windows Phone. Part 1 covers the following three basic topics for development:

  • Installation of the Windows Phone SDK
  • Windows Phone User Interface (UI)
  • Understanding between controls
1. Installation of Windows Phone SDK

First download and install the entire development tool for the Windows Phone 7 Series from the link. After installation of the preceding SDK 7.1, go to the following link and download.

Windows Phone SDK includes the following:
  • Microsoft Visual Studio 2010 Express for Windows Phonee
  • Windows Phone Emulator
  • Windows Phone SDK 7.1 Assemblies
  • Silverlight 4 SDK
  • Windows Phone SDK 7.1 Extensions for XNA Game Studio 4.0
  • Microsoft Expression Blend SDK for Windows Phone 7
  • Microsoft Expression Blend SDK for Windows Phone OS 7.1
  • WCF Data Services Client for Window Phone
  • Microsoft Advertising SDK for Windows Phone

2. Windows Phone UI

First select New project from the File menu, then select Window Phone Application and provide the name of your application and also select the location of your application.

See the Default UI of Windows Phone as <Grid> and <Stack Panel> Panel elements.

page name

1. < StackPanel>

The Stack Panel contains the name of the application and the page name.

  1. <StackPanel x:Name="TitlePanel" Grid.Row="0"   
  2.    <TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource  PhoneTextNormalStyle}"/>  
  3.    <TextBlock x:Name="PageTitle" Text="page name Style="{StaticResource PhoneTextTitle1Style}"/>  
  4. </StackPanel>  
2. < Grid>

The Grid Panel contains all the other controls, such as stackpanel, TextBox, TextBlock, Button, HyperLinkButton, Image and so on.
  1. <Grid x:Name="ContentPanel" Grid.Row="1"  Margin="12,0,12,0">  
  2.    <Button x:Name="Button" Content="Button" Height="95" ></Button>  
  3.    <TextBlock x:Name="TextBlock" Text="This is TextBlock" Height="95" ></TextBlock>  
  4.    <Image x:Name="Image" Height="100" Margin="6,378,-6,129"   
  5.         Source="/PhoneApp1;component/Images/Chrysanthemum.jpg"></Image>  
  6. </Grid>  
3. Understanding between controls

Windows Phone 7 provides various controls including Button, TextBox, TextBlock, Image and HyperLink.
  1. Button: The Button control is responsible for firing a trigger.
    1. <Button x:Name="Button" Content="Button" Height="95" ></Button>  
  2. TextBlock: The TextBlock control displays a block of text in textual format.
    1. <TextBlock x:Name="TextBlock" Text="This is TextBlock" Height="95" ></TextBlock>  
  3. TextBox: TextBox control enters text in the TextBox.
    1. <TextBox x:Name="MyTextBox" Text="Hai" Height="95" Margin="0,98,0,0" VerticalAlignment="Top"></TextBox>  
  4. Image: The Image Control displays an image in image controls.
    1. <Image x:Name="Image" Height="100" Margin="12,320,-12,187" Source="/PhoneApp1;component/Images/Chrysanthemum.jpg"></Image>  
  5. HyperLinkButton: The HyperLink button is only responsible for navigation from one page to another page.
    1. <HyperlinkButton Content="HyperlinkButton" Height="44" HorizontalAlignment="Left" Margin="12,450,0,0" Name="hyperlinkButton1" VerticalAlignment="Top" Width="258" />  
    design

I hope you understand the uses of the various controls.


Similar Articles