×
Namespaces

Variants
Actions
(Difference between revisions)

Creating your first Windows Phone app

From Nokia Developer Wiki
Jump to: navigation, search
vdharankar (Talk | contribs)
(Vdharankar - Second half of tutorial)
hamishwillee (Talk | contribs)
m (Hamishwillee -)
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
[[Category:Windows Phone]][[Category:Silverlight]]
+
[[Category:Getting Started on Windows Phone‎]][[Category:XAML]][[Category:Windows Phone 7.5]]
{{Abstract|This article explains how to ... }}  
+
{{Abstract|This tutorial style article explains how to create your first Windows Phone 7.5 app. }}  
  
 
{{ArticleMetaData <!-- v1.2 -->
 
{{ArticleMetaData <!-- v1.2 -->
Line 9: Line 9:
 
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
 
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
 
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
 
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->  
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
|signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
+
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|translated-by= <!-- [[User:XXXX]] -->
 
|translated-by= <!-- [[User:XXXX]] -->
|translated-from-title= <!-- Title only -->  
+
|translated-from-title= <!-- Title only -->
 
|translated-from-id= <!-- Id of translated revision -->
 
|translated-from-id= <!-- Id of translated revision -->
|review-by=<!-- After re-review: [[User:username]] -->
+
|review-by= <!-- After re-review: [[User:username]] -->
 
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 
|update-by= <!-- After significant update: [[User:username]]-->
 
|update-by= <!-- After significant update: [[User:username]]-->
 
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 
|update-timestamp= <!-- After significant update: YYYYMMDD -->
|creationdate= <!-- Format YYYYMMDD -->
+
|creationdate= 20121228
|author= <!-- Display as link [[User:username]] -->
+
|author= [[User:Vdharankar]]
 
}}
 
}}
  

Latest revision as of 08:26, 4 July 2013

This tutorial style article explains how to create your first Windows Phone 7.5 app.

SignpostIcon XAML 40.png
SignpostIcon WP7 70px.png
WP Metro Icon Baby.png
Article Metadata
Compatibility
Platform(s):
Windows Phone 7.5
Article
Created: vdharankar (28 Dec 2012)
Last edited: hamishwillee (04 Jul 2013)

Contents

[edit] Introduction

This tutorial will explain how to create your first Windows Phone app using Expression Blend.

[edit] How to...

  • Start with the new project
  • Select ‘Windows Phone Application’
  • Assign some suitable name to the application
  • Click Finish
  • You should land up with the same screen like in the previous tutorial.
  • Set the view percentage to suitable value
  • Delete both the TextBlock controls from page
  • Drag a button from ToolBox to the page

T2im1.png

  • Click on the button to reposition it at the bottom center, using Selection Tool
  • Click two times inside the button and change its title to “About”

T2im2.png

  • Select button with selection tool
  • See all the events offered by button in properties window
  • Double click on empty click event to add event handler

T2im3.png

  • Observe the click event handler function in the class called as MainPage
  • MainPage is derived from PhoneApplicationPage

T2im4.png

  • Type following line of code in the click event handler function
MessageBox.Show("MyFirst WP application !");
  • Press F5 to run and test the app developer so far. Result will be as shown below

T2im5.png

Above image explains how the application will appear in emulator

  • Click on XAML page to go to design of the page

T2im6.png

  • Drag a TextBlock and two Buttons on Page and place them on page
  • User Selection too to reposition them on page

T2im7.png

  • Select the TextBlock and set its name property as “txtCount” ( this will be used to change the Properties of TextBlock)
  • Change name of first Button to “btnUp” and second to Button to “btnDown” by selecting the Buttons one by one

T2im8.png

  • Click two times (not the double click) on the Button to change title of first Button as “up” and then second Button to “down”
  • Click two times on TextBlock and change the title to “0”

T2im9.png

  • Now select Button first “btnUp” and goto “click” event in property window
  • Double click on property window to add click event handler
  • Change the code as follows then press F5 and test the app.

T2im10.png

  • Now switch to design view select second Button “btnDown” and goto “click” event in property window
  • Double click on property window to add click event handler
  • Change the code as follows then press F5 and test the app.

T2im11.png

This finishes the application which counts up the counter and down.

[edit] Summary

This tutorial gives handson experience of developing your first application on WP using expression blend.


[edit] Version Hint

Windows Phone: [[Category:Windows Phone]]
[[Category:Windows Phone 7.5]]
[[Category:Windows Phone 8]]

Nokia Asha: [[Category:Nokia Asha]]
[[Category:Nokia Asha Platform 1.0]]

Series 40: [[Category:Series 40]]
[[Category:Series 40 1st Edition]] [[Category:Series 40 2nd Edition]]
[[Category:Series 40 3rd Edition (initial release)]] [[Category:Series 40 3rd Edition FP1]] [[Category:Series 40 3rd Edition FP2]]
[[Category:Series 40 5th Edition (initial release)]] [[Category:Series 40 5th Edition FP1]]
[[Category:Series 40 6th Edition (initial release)]] [[Category:Series 40 6th Edition FP1]] [[Category:Series 40 Developer Platform 1.0]] [[Category:Series 40 Developer Platform 1.1]] [[Category:Series 40 Developer Platform 2.0]]

Symbian: [[Category:Symbian]]
[[Category:S60 1st Edition]] [[Category:S60 2nd Edition (initial release)]] [[Category:S60 2nd Edition FP1]] [[Category:S60 2nd Edition FP2]] [[Category:S60 2nd Edition FP3]]
[[Category:S60 3rd Edition (initial release)]] [[Category:S60 3rd Edition FP1]] [[Category:S60 3rd Edition FP2]]
[[Category:S60 5th Edition]]
[[Category:Symbian^3]] [[Category:Symbian Anna]] [[Category:Nokia Belle]]

This page was last modified on 4 July 2013, at 08:26.
142 page views in the last 30 days.
×