Presentation is loading. Please wait.

Presentation is loading. Please wait.

Frame rootFrame = Window.Current.Content as Frame; if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to.

Similar presentations


Presentation on theme: "Frame rootFrame = Window.Current.Content as Frame; if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to."— Presentation transcript:

1

2

3

4

5

6 Frame rootFrame = Window.Current.Content as Frame; if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); // Place the frame in the current Window Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { rootFrame.Navigate(typeof(HubPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate();

7

8 2-517: What’s New with Windows Phone Silverlight Apps!

9

10

11

12

13 void InitializeBackButtonHandling() { HardwareButtons.BackPressed += HardwareButtons_BackPressed; } private void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e) { Frame frame = Window.Current.Content as Frame; if (frame == null) return; if (frame.CanGoBack) { frame.GoBack(); e.Handled = true; }

14

15

16

17  Resume your app as the user left if rather than starting it fresh  Start the app fresh if a long period of time has elapsed since the user last access it  When in doubt, provide the user with a choice

18

19

20

21

22 A link to somewhere within the app other than the top A pin on Start Screen Toast Action Center Link in the browser An attachment in an …more On Phone, Back button from a deep link page should take the user where they came from

23

24

25

26

27

28

29

30

31

32

33

34

35

36 Resume your app if the user has done work that would be frustrating to lose. Start the app fresh if a long period of time has elapsed since the user last used it Avoid stranding users coming from Deep Links Phone Back button takes users where they came from

37  Similar Page Navigation Model on Windows and Phone  Fast App Resume is the default on both Windows and Phone  Soft back button for Windows apps, HW Back for Phone apps  Follow UX guidance to preserve Back Button behavior on Phone

38

39

40


Download ppt "Frame rootFrame = Window.Current.Content as Frame; if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to."

Similar presentations


Ads by Google