Navigation Developer's guide to Windows 10 Insider Preview Andy & Jerry.

18
Navigation Developer's guide to Windows 10 Insider Preview Andy & Jerry

Transcript of Navigation Developer's guide to Windows 10 Insider Preview Andy & Jerry.

NavigationDeveloper's guide to Windows 10 Insider PreviewAndy & Jerryhttp://windows.Microsoft.comLayoutNavigationAgendahttp://windows.Microsoft.comLayouthttp://windows.Microsoft.comMinimum sizeApplicationView.GetForCurrentView()TryResizeView(new size(width, height)))Check return value (Boolean)http://windows.Microsoft.comResizeApplicationView.GetForCurrentView()SetPreferredMinSize(new size(width, height)))Check return value (ENUM)http://windows.Microsoft.comUnderstanding immersive mode

Non-resizable, mobile SKULimited sizing optionsFull screen modeDeveloper can now request Full ScreenDeveloper can now test Full Screen

http://windows.Microsoft.comWindowingWindows.ApplicationModel.Core.CoreApplication.CreateNewView()Windows.UI.ViewManagement.ApplicationViewSwitcher.SwitchAsync()Windows.UI.ViewManagement.ApplicationViewSwitcher.TryShowAsStandaloneAsync()Available across all of Windows 10New view must call Window.Activate()

http://windows.Microsoft.comMulti-view on launchWindows.UI.ViewManagement.ApplicationViewSwitcher.DisableSystemViewActivationPolicy()Opt-in to the activation policyApplicationViewSwitcher.DisableShowingMainViewOnActivation()Prevent flicker on launch

http://windows.Microsoft.comNavigationhttp://windows.Microsoft.comFrame.NavigateSend to a typePass a stringNavigation servicePart of Template 10 project templateprivate void Goto2(object sender, Windows.UI.Xaml.RoutedEventArgs e){ var app = App.Current as Common.BootStrapper; var nav = app.NavigationService; nav.Navigate(typeof(Views.Page2), "My marameter value");}http://windows.Microsoft.comNavigation parametersPage.OnNavigatedTo()Standard in WindowsViewModel.OnNavigatedToWith Template 10 project templatepublic override void OnNavigatedTo(string parameter, NavigationMode mode, IDictionary state){ this.Parameter = parameter?.ToString() ?? "Empty";}http://windows.Microsoft.comNavigation parametersDEMOhttp://windows.Microsoft.com

http://windows.Microsoft.comOpt-in, shell-drawn back button

http://windows.Microsoft.comBack buttonEssentially same as Phone 8.1Back navigates back within app, then to previous appUAP apps request the optional, shell-drawn back buttonWith one improvementBacking out does not close the appAnd, a new scenario for tabletIn split screen, there is a [back stack] for each side of the screen

Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().IsShellChromeBackEnabled = true;Windows.UI.Core.SystemNavigationManager.GetForCurrentView().BackRequested += HandleBack;http://windows.Microsoft.comBack supportSupport gesturesWindows + backspaceHardware back buttonKeyboard back buttonMouse back button(Template 10)Opt-in to back in Windowed modeAutomatic in immersiveSome guidanceDont strand usersDont hijack backhttp://windows.Microsoft.comLayoutNavigation

Reviewhttp://windows.Microsoft.com 2014 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.http://windows.Microsoft.com