Windows Phone 7<br />Li Jingnan / Wang Tao<br />2011-7-15<br />1<br />
2 days<br />2<br />
about<br />anytao| Ethos<br /><ethos:Member<br />   id = “Wang Tao”<br />   msn = anytao@live.com<br />weibo = http://weib...
about<br />http://book.anytao.net<br />
03 application bar<br />Wang Tao / 2011-07-15<br />
session outline<br />application bar<br />navigation<br />overview<br />frame & page<br />application bar<br />overview<br...
navigations<br />7<br />
frame & page<br />PhoneApplicationFrame<br />Top Container: PhoneApplicationFrame<br />Including:<br />Page control<br />S...
ApplicationBar<br />use ApplicationBar instead of creating you own menu system<br />ApplicationBarIconButton<br />up to 4b...
Application Bar in xaml<br />10<br />
ApplicationBar and Landscope<br />11<br />
Application Bar opacity<br />12<br />
page navigation<br />13<br />Silverlight on Windows Phone<br />Similar like web page<br />Navigate by URI<br />Stateless<b...
navigation method<br />OnNavigatingFrom<br />OnNavigatedFrom<br />OnNavigatedTo<br />14<br />
query string<br />send query string<br />private void passParam_Click(object sender, RoutedEventArgs e)<br />{<br />Naviga...
go back<br />private void button1_Click<br />(object sender, RoutedEventArgs e)<br />{ <br />NavigationService.GoBack(); <...
navigate in UserControl<br />17<br />
demo<br />18<br />/ app bar<br />/ app bar menu<br />/ landscape <br />/ navigation service<br />02 application bar<br />
practice<br />19<br />build your context menu<br />
20<br />thank youwww.anytao.com<br />
21<br />
Upcoming SlideShare
Loading in...5
×

03 wp7 application bar

542

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
542
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 所有应用程序必须要有一个根Phone Frame可以从它继承自定义
  • 在创建之前一定要先在Reference里加入Microsoft.Phone.shell,并且在xaml页面加上xmlns:shell=”clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone.Shell”.菜单栏设计最佳实践在设计菜单栏时要考虑的有以下几点:* 利用系统提供的菜单栏而非自己创建的菜单系统。这样能够使设备上所有应用程序保持统一的用户体验。而且系统提供的菜单栏支持动画和屏幕变换。* 用系统默认的主题而非自定义的颜色。使用自定义颜色会影响图标按钮和菜单动画的效果,而且在某些显示设置下会更耗电。* 菜单栏的透明度可以任意调整,但这里推荐只使用0,0.5和1。* 如果菜单栏的透明度小于1,当前显示页面大小会和屏幕大小一样,菜单栏会遮在它上面。如果透明度为1,显示页面会自动改变大小以适应未被菜单栏遮住的区域。图标按钮设计最佳实践* 用作图标的图片应该是使用了a通道的图片,其背景色为透明,前景色为白色。菜单栏会根据系统主题样式来改变图标的颜色。如果使用了带有背景色的图片,会导致不可预知的问题。* 图标按钮上的圆圈是在运行时由菜单栏加上去的,不需要在源图片里添加圆圈。* 用作图标的图片大小应该是48x48像素。图片内容的大小应该不超出26x26像素的范围,这样才不会被菜单栏加上的圆圈遮住。* 不要设置后退按钮。因为设备上的后退按钮就是专门指定用于页面后退的。* 把最常用的功能设置在图标按钮上。如果某些功能用图标不容易理解,就考虑用菜单项。* 图标按钮上的图片退便在转屏时不要有歧义。* 可以直接用于你的程序中的图标可以从这里下载。 菜单项设计最佳实践* 避免使用超过5个的菜单项,否则用户必须滚动屏幕才能看到。* 在单个菜单项中避免使用过长的文字,否则会引起截断。推荐菜单项内容长度为14到20个英文字符之间。* 为保证良好的用户体验,所有的菜单项和图标按钮的文字都会被变成小写字符。
  • Silverlight on Windows Phone基于页面导航模型与Web页面模型相似通过URI标识每个页面每个页面是无状态的
  • 当Page1切换到Page21.Page1执行OnNavigatingFrom2.Page1执行OnNavigatedFrom3.Page2执行OnNavigateToOnNavigatingFrom当Page不再是活动页面前OnNavigatedFrom当Page不再是活动页面时OnNavigatedTo当Page被激活时
  • Transcript of "03 wp7 application bar"

    1. 1. Windows Phone 7<br />Li Jingnan / Wang Tao<br />2011-7-15<br />1<br />
    2. 2. 2 days<br />2<br />
    3. 3. about<br />anytao| Ethos<br /><ethos:Member<br /> id = “Wang Tao”<br /> msn = anytao@live.com<br />weibo = http://weibo.com/anytao<br />runat = “Senior System Architect”<br />/><br />Jason | Ethos<br /><ethos:Member<br /> id = “Li Jingnan”<br /> msn = zengnami@hotmail.com<br />weibo= http://weibo.com/jn1981<br />runat = “SE”<br />/><br />
    4. 4. about<br />http://book.anytao.net<br />
    5. 5. 03 application bar<br />Wang Tao / 2011-07-15<br />
    6. 6. session outline<br />application bar<br />navigation<br />overview<br />frame & page<br />application bar<br />overview<br />page navigation<br />methods<br />query string<br />goback<br />
    7. 7. navigations<br />7<br />
    8. 8. frame & page<br />PhoneApplicationFrame<br />Top Container: PhoneApplicationFrame<br />Including:<br />Page control<br />System Tray<br />Application Bar<br />PhoneApplicationPage<br />Fill content of Frame<br />Page inherit from PhoneApplicationPage<br />Including:<br />Title<br />Application Bar<br />8<br />
    9. 9. ApplicationBar<br />use ApplicationBar instead of creating you own menu system<br />ApplicationBarIconButton<br />up to 4buttons<br />don’t fill all 4 slots if not need<br />size: 48×48<br />ApplicationBarMenuItem<br />up to 5 menus<br />avoid long text<br />9<br />
    10. 10. Application Bar in xaml<br />10<br />
    11. 11. ApplicationBar and Landscope<br />11<br />
    12. 12. Application Bar opacity<br />12<br />
    13. 13. page navigation<br />13<br />Silverlight on Windows Phone<br />Similar like web page<br />Navigate by URI<br />Stateless<br />private void hyperlinkButton1_Click<br />(object sender, RoutedEventArgs e)<br />{ <br />NavigationService.Navigate(<br /> new Uri("/SecondPage.xaml", UriKind.RelativeOrAbsolute)); <br />}<br />
    14. 14. navigation method<br />OnNavigatingFrom<br />OnNavigatedFrom<br />OnNavigatedTo<br />14<br />
    15. 15. query string<br />send query string<br />private void passParam_Click(object sender, RoutedEventArgs e)<br />{<br />NavigationService.Navigate(new Uri("/SecondPage.xaml?msg=" + textBox1.Text, UriKind.Relative));<br />}<br />get query string<br />protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)<br />{<br />base.OnNavigatedTo(e);<br /> string msg = string.Empty; <br /> if (NavigationContext.QueryString.TryGetValue("msg", out msg))<br /> textBlock1.Text = msg; <br />}<br />15<br />
    16. 16. go back<br />private void button1_Click<br />(object sender, RoutedEventArgs e)<br />{ <br />NavigationService.GoBack(); <br />}<br />16<br />
    17. 17. navigate in UserControl<br />17<br />
    18. 18. demo<br />18<br />/ app bar<br />/ app bar menu<br />/ landscape <br />/ navigation service<br />02 application bar<br />
    19. 19. practice<br />19<br />build your context menu<br />
    20. 20. 20<br />thank youwww.anytao.com<br />
    21. 21. 21<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×