Navigation
Back Button Master/detail Navigation menu (XAML)
Pivot Projection XHR, handling navigation errors, and URL schemes

Back Button Sample (回退按钮)

This sample demonstrates how to set up an event handler for the back button event and how to enable the title bar back button for when the app is in windowed Desktop mode.

Specifically, this sample covers:

  • Setting up an event handler for BackRequested and to navigate back in the page stack.
  • Enabling and disabling the title bar back button based on the app's internal page stack.

Master/detail sample (宽屏幕上同时展示详细信息,窄屏幕则导航到详细页)

This sample shows how to implement a responsive master/detail experience in XAML. In the master/detail pattern, a master list is used to select an item that will then appear in a detail view.

When the app view is sufficiently wide, the master list and detail view should appear side by side in the same app page. However, on smaller screen sizes, the two pieces of UI should appear on different pages, allowing the user to navigate between them. This sample shows how to implement these experiences and adaptively switch between them based on the size of the screen.

Specifically, this sample demonstrates:

  • Creating a side-by-side master/detail experience in XAML: In MasterDetailPage.xaml, a master list is used to switch between detail items in a side-by-side view. This page will also responsively update to include just the master list when the view is narrow.
  • Navigating between the master list and a detail view: At narrow screen sizes, the user can navigate between the master list in MasterDetailPage.xaml and detail view in DetailPage.xaml to view different items.
  • Changing the navigation model when the app is resized: This sample contains the code necessary to adaptively switch between the two experiences described above at runtime based on screen size.

Navigation menu (XAML) sample (导航菜单)

This sample demonstrates how to provide a top-level navigation menu to users (a.k.a. a hamburger menu).

Specifically, this sample shows how to:

  • Utilize a SplitView control: The SplitView is a control with two content areas: the Pane and the Content.  The Pane can be opened or closed.  Using the DisplayMode property the app can switch the Pane to Overlay the Content or appear Inline.  When the available space is constrained the Pane can be put into a CompactOverlay or CompactInline mode where it provides a visual hint to the user.
  • Customize a ListView to present menu items with a single-selection experience: This uses a ListView to present the default visuals for the menu items and customizes the keyboarding behavior to provide a single selection model where up/down/tab/shift+tab moves through each item and 'Enter' and 'Space' select the item.

Pivot sample (相当于手机上的Tab控件)

This sample shows how to use a Pivot control in your UWP application.

Specifically, this sample shows how to:

  • Use pivots across devices : No longer just a mobile control, pivot works great with mouse, keyboard, and touch
  • Show custom header content: Learn how to create responsive experiences with the new header content areas
  • Create custom experices: With its improved flexibility, learn how to create a 'tabs-style' experience with Pivot

Projection sample (用于投影或多屏)

This sample demonstrates how to display two different views of your app UI on different screens, as users might do when projecting your app in a meeting or conference.

The sample demonstrates:

  • Displaying two different views of your app on different screens.
  • Starting, stopping and swapping views.
  • Using ProjectionManager and ApplicationViewSwitcher APIs.
  • Enumerating available screens to project to and projecting a view of your app to a specific one.

XHR, handling navigation errors, and URL schemes sample (仅用于JS)

Windows-universal-samples学习笔记系列三:Navigation的更多相关文章

  1. 步步为营 SharePoint 开发学习笔记系列总结

    转:http://www.cnblogs.com/springyangwc/archive/2011/08/03/2126763.html 概要 为时20多天的sharepoint开发学习笔记系列终于 ...

  2. Windows phone 8 学习笔记(9) 集成

    原文:Windows phone 8 学习笔记(9) 集成 本节整理了之前并没有提到的Windows phone 8 系统相关集成支持,包括选择器.锁定屏幕的.联系人的访问等.选择器列举了若干内置应用 ...

  3. Windows phone 8 学习笔记(7) 设备

    原文:Windows phone 8 学习笔记(7) 设备 本节主要涉及到 Windows phone 8 手机支持的各类设备,包括相机.设备状态,振动装置等.还有各类感应器,包括磁力计.加速度器和陀 ...

  4. Windows phone 8 学习笔记(6) 多任务

    原文:Windows phone 8 学习笔记(6) 多任务 Windows phone 8 是一个单任务操作系统,任何时候都只有一个应用处于活跃状态,这里的多任务是指对后台任务的支持.本节我们先讲讲 ...

  5. Windows phone 8 学习笔记(4) 应用的启动

    原文:Windows phone 8 学习笔记(4) 应用的启动 Windows phone 8 的应用除了可以直接从开始菜单以及应用列表中打开外,还可以通过其他的方式打开.照片中心.音乐+视频中心提 ...

  6. Windows phone 8 学习笔记(3) 通信

    原文:Windows phone 8 学习笔记(3) 通信 Windows phone 8 可利用的数据通信方式比较广泛,在硬件支持的前提下,我们可以利用WiFi.蓝牙.临近感应等多种方式.数据交互一 ...

  7. Windows phone 8 学习笔记(1) 触控输入

    原文:Windows phone 8 学习笔记(1) 触控输入 Windows phone 8 的应用 与一般的Pc应用在输入方式上最大的不同就是:Windows phone 8主要依靠触控操作.因此 ...

  8. Windows phone 8 学习笔记(8) 定位地图导航

    原文:Windows phone 8 学习笔记(8) 定位地图导航 Windows phone 8 已经不使用自家的bing地图,新地图控件可以指定制图模式.视图等.bing地图的定位误差比较大,在模 ...

  9. Windows phone 8 学习笔记(5) 图块与通知

    原文:Windows phone 8 学习笔记(5) 图块与通知 基于metro风格的Windows phone 8 应用提到了图块的概念,它就是指启动菜单中的快速启动图标.一般一个应用必须有一个默认 ...

随机推荐

  1. tabindex 去掉虚线

    参考 https://bbs.csdn.net/topics/390165247 style="outline: none"

  2. RedHat 更新CentOS Yum源(转)

    经测试,可用.转自:https://www.cnblogs.com/tangsen/p/5151994.html 一.随笔引言 1.1随笔内容: 1.RedHat 配置Centos yum源 2.yu ...

  3. c# 键值对的方式post提交

    DataContractJsonSerializer jsQcData = new DataContractJsonSerializer(typeof(DATA<data>));//DAT ...

  4. Java 微服务框架选型 Dubbo 和 Spring Cloud

    微服务(Microservices)是一种架构风格,一个大型复杂软件应用由一个或多个微服务组成.系统中的各个微服务可被独立部署,各个微服务之间是松耦合的.每个微服务仅关注于完成一件任务并很好地完成该任 ...

  5. Shell特殊变量:$0 $# $* $@ $? $$和命令行参数

    一.特殊变量表 变量 含义 $0 当前脚本的文件名 $n 传递给脚本或函数的参数.n 是一个数字,表示第几个参数.例如,第一个参数是$1,第二个参数是$2. $# 传递给脚本或函数的参数个数. $* ...

  6. sudo和su的区别

    su 命令 su su命令的主要作用是让你可以在已登录的会话中切换到另外一个用户.换句话说,这个工具可以让你在不登出当前用户的情况下登录为另外一个用户. su命令经常被用于切换到超级用户或 root ...

  7. mysql的事务,隔离级别和锁

    事务就是一组一起成功或一起失败的sql语句.事务还应该具备,原子性,一致性,隔离性和持久性. 一.事务的基本要素 (ACID) 1.原子性:事务开始后,所有的操作,要么全部成功,要么全部失败,不可能处 ...

  8. Faiss教程:索引(2)

    索引的I/O与复制 所有的函数都是深复制,我们不需要关心对象关系. I/O函数: write_index(index, "large.index"): 写索引到文件 Index * ...

  9. java命令行调用本地文件协议hikvideoclient://

    最近在做一个视频项目,项目中需要通过调用海康本地协议打开视频播放器,起初尝试通过Process/ProcessBuilder无解,因为这个是调用本地应用程序的. 我要调用的是本地伪协议,最终通过一些研 ...

  10. Vue 全局注册逐渐 和 局部注册组件

    //定义一个名为 button-counter 的新组件 Script: Vue.component('button-counter',{//button-counter 这个是组件的名字 data: ...