1 / 18

Account Helper 经验分享

Account Helper 经验分享. @ 徐水峰 (Alexis ). Agenda. ProgressIndicator. 7 useful tips. Part I 7 useful tips. 1. Custom ContextMenu. < toolkit : ContextMenuService.ContextMenu > < toolkit : ContextMenu IsZoomEnabled ="False"  Background ="White">

dean
Download Presentation

Account Helper 经验分享

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Account Helper 经验分享 @徐水峰(Alexis )

  2. Agenda ProgressIndicator 7 useful tips

  3. Part I7 useful tips

  4. 1. Custom ContextMenu <toolkit:ContextMenuService.ContextMenu> <toolkit:ContextMenuIsZoomEnabled="False" Background="White"> <toolkit:MenuItem Command=“…"> <toolkit:MenuItem.Header> <StackPanel Orientation="Horizontal"> <Image Source="Images/Appbar/edit.png" /> <TextBlock Text="编辑"Foreground="Black"/> </StackPanel> </toolkit:MenuItem.Header> </toolkit:MenuItem> ……………. </toolkit:ContextMenu> </toolkit:ContextMenuService.ContextMenu>

  5. 2. ItemContainerStyle Gets or sets the Style that is applied to the container element generated for each item. <Style x:Key="S_ListBoxItem"TargetType="ListBoxItem"> <SetterProperty="HorizontalContentAlignment" Value="Stretch" /> </Style>

  6. 3. Panorama Bind SelectIndex

  7. 4. Live Tiles

  8. 5. Unregister Messenger in time Method 1 Register messengers in Page OnNavigatedTometod Unregister in Page OnNavigatedFrommethod Method 2 Register messengers in Page Constructor method Unregister in Page OnBackKeyPressmethod

  9. 6. Clear VM Property in time Why should we do that ? Consider following situation: MainPageDetailPage: ADetailVM.ImgSource Press BackKeygo back and select another item MainPageDetailPage: BDetailVM.ImgSource A Temp page or detail page ,we should remember: Clear Property in Time

  10. 7. Avoid user input conflicts Consider that: how can we enable items in list can receive both Tap and Touch and Hold ?

  11. Source Code http://accounthelper.codeplex.com

  12. Part IIProgressIndicator

  13. ProgressIndicator

  14. How to use ProgressIndicator In MainPage.xaml.cs 1.ProgressIndicator pi = newProgressIndicator(); 2. pi.Text = "Hello World";              pi.IsIndeterminate = true;              pi.IsVisible = true; 3. SetValue(SystemTray.IsVisibleProperty, true); SetValue(SystemTray.ProgressIndicatorProperty, pi);  

  15. Have a Test 需求: 开启广告按钮后,每隔2秒自动播放一条广告

  16. Q:Where is the bug ?

  17. Thank you!

More Related