03 wp7 application bar

Preview:

Citation preview

Windows Phone 7

Li Jingnan / Wang Tao2011-7-15

1

Windows Phone Microsoft Corporation.

2 days 9:00 Introduction Anytao

10:30 Build a Silverlight Application Jason

13:00 Application Bar Anytao

14:30 Panorama and Pivots Jason

16:00 Launcher and Chooser Jason

9:00 Isolation Storage Anytao

10:30 Application Lifecycle Jason

13:00 Push Notification Anytao

14:30 Multitasking Jason

16:00 Local Database Anytao

9:00 Design Apps Using Expression Blend and Metro Jason

10:30 Marketing your Windows Phone Application Jason

13:00 Working with Azure Anytao

2

Windows Phone Microsoft Corporation.

about

anytao | Ethos

<ethos:Member id = “Wang Tao” msn = anytao@live.com weibo = http://weibo.com/anytao runat = “Senior System Architect”/>

Jason | Ethos

<ethos:Member id = “Li Jingnan” msn = zengnami@hotmail.com weibo = http://weibo.com/jn1981 runat = “SE”/>

Windows Phone Microsoft Corporation.

abouthttp://book.anytao.net

03 application bar

Wang Tao / 2011-07-15

Windows Phone Microsoft Corporation.

session outlineapplication bar

overview frame & page application bar

navigation

overview page navigation

methods query string goback

Windows Phone Microsoft Corporation.

navigations

7

Windows Phone Microsoft Corporation.

frame & page

8

PhoneApplicationFrame Top Container:

PhoneApplicationFrame Including:

Page control System Tray Application Bar

PhoneApplicationPage Fill content of Frame Page inherit from

PhoneApplicationPage Including:

Title Application Bar

Windows Phone Microsoft Corporation.

ApplicationBar

9

use ApplicationBar instead of creating you own menu system

ApplicationBarIconButton up to 4 buttons don’t fill all 4 slots if not

need size: 48×48

ApplicationBarMenuItem up to 5 menus avoid long text

Windows Phone Microsoft Corporation.10

Application Bar in xaml

Windows Phone Microsoft Corporation.11

ApplicationBar and Landscope

Windows Phone Microsoft Corporation.12

Application Bar opacity

Windows Phone Microsoft Corporation.

page navigation

13

Silverlight on Windows Phone Similar like web page Navigate by URI Stateless

private void hyperlinkButton1_Click(object sender, RoutedEventArgs e){ NavigationService.Navigate( new Uri("/SecondPage.xaml", UriKind.RelativeOrAbsolute)); }

Windows Phone Microsoft Corporation.

navigation method

14

OnNavigatingFrom OnNavigatedFrom OnNavigatedTo

Windows Phone Microsoft Corporation.

query string

15

private void passParam_Click(object sender, RoutedEventArgs e){ NavigationService.Navigate(new Uri("/SecondPage.xaml?msg=" +

textBox1.Text, UriKind.Relative));}

get query stringprotected override void OnNavigatedTo( System.Windows.Navigation.NavigationEventArgs e){ base.OnNavigatedTo(e); string msg = string.Empty; if (NavigationContext.QueryString.TryGetValue("msg", out msg)) textBlock1.Text = msg; }

send query string

Windows Phone Microsoft Corporation.

go back

16

private void button1_Click(object sender, RoutedEventArgs e){ NavigationService.GoBack(); }

Windows Phone Microsoft Corporation.

navigate in UserControl

17

Windows Phone Microsoft Corporation.18

demo02 application bar

/ app bar/ app bar menu/ landscape / navigation service

Windows Phone Microsoft Corporation.19

practicebuild your context menu

Windows Phone Microsoft Corporation.20

Click to add picturethank youwww.anytao.com

Windows Phone Microsoft Corporation.

© 2011 Microsoft Corporation.

All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.

MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

21