Академический Документы
Профессиональный Документы
Культура Документы
Windows Phone 7
Simple Interesting Hello World
By : Yoza Wiratama
Objective :
1. Create simple hello world with click event in application bar button 1. Visual Studio and Windows Phone SDK 2. Create Textbox using XAML Code 3. Application Bar with XAML Code and Click Trigger 2. Use List<> in windows phone
Solution Explorer
2. Click New Project Click New Project and select Silverlight for Windows Phone in Installed Templates for Visual C#. After That select Windows Phone Application, Change your project name : Hello World, or you can change with according what you want. Then Click OK
New Project
3. Target OS Version Select Windows Phone OS 7.0 for the version, then click OK
OS Version
4. Solution Explorer In this solution explorer you can see all your document for the project you create. 2 By Yoza Wiratama | yozawiratama.net
5. Change Page Title Double Click in MainPage.xaml in Solution explorer and you will open MainPage.xaml.
MainPage.xaml
On design view click on text page name and code view directliy focus in :
<TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
6. Insert Image In solution explorer, right click on Hello World select add , then New Folder change name to be Images. And also right click on Images Folder, add, then Existing File Or you can Shift + Alt + A. Open File window will open, and open : C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.0\Icons\dark Add three icon : 1. appbar.back.rest.png 2. appbar.check.rest.png 3. appbar.next.rest.png Then add. Select three of that image using Hold shift + Click, look at properties. In Build Action change to Content.
Insert Images
MainPage.xaml
8. C# Code Right Click in xaml and select View Code, and you will open MainPage.xaml.cs
MainPage.xaml.cs
2. C# Code 1. Add List<> in class and can access for all method :
2. ApplicationBarButton Event :
3. Run Project with F5, you can click next, check and back button.