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.
1. < StackPanel>
The Stack Panel contains the name of the application and the page name.
- <StackPanel x:Name="TitlePanel" Grid.Row="0"
- <TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
- <TextBlock x:Name="PageTitle" Text="page name Style="{StaticResource PhoneTextTitle1Style}"/>
- </StackPanel>
2. < Grid>
The Grid Panel contains all the other controls, such as stackpanel, TextBox, TextBlock, Button, HyperLinkButton, Image and so on.
- <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
- <Button x:Name="Button" Content="Button" Height="95" ></Button>
- <TextBlock x:Name="TextBlock" Text="This is TextBlock" Height="95" ></TextBlock>
- <Image x:Name="Image" Height="100" Margin="6,378,-6,129"
- Source="/PhoneApp1;component/Images/Chrysanthemum.jpg"></Image>
- </Grid>
3. Understanding between controlsWindows Phone 7 provides various controls including Button, TextBox, TextBlock, Image and HyperLink.
- Button: The Button control is responsible for firing a trigger.
- <Button x:Name="Button" Content="Button" Height="95" ></Button>
- TextBlock: The TextBlock control displays a block of text in textual format.
- <TextBlock x:Name="TextBlock" Text="This is TextBlock" Height="95" ></TextBlock>
- TextBox: TextBox control enters text in the TextBox.
- <TextBox x:Name="MyTextBox" Text="Hai" Height="95" Margin="0,98,0,0" VerticalAlignment="Top"></TextBox>
- Image: The Image Control displays an image in image controls.
- <Image x:Name="Image" Height="100" Margin="12,320,-12,187" Source="/PhoneApp1;component/Images/Chrysanthemum.jpg"></Image>
- HyperLinkButton: The HyperLink button is only responsible for navigation from one page to another page.
- <HyperlinkButton Content="HyperlinkButton" Height="44" HorizontalAlignment="Left" Margin="12,450,0,0" Name="hyperlinkButton1" VerticalAlignment="Top" Width="258" />
I hope you understand the uses of the various controls.