面向开发人员的 Windows 10 内部版本 10240 中的新增功能What's new in Windows 10 for developers, build 10240

Windows 10 内部版本 10240 和更新的 SDK 提供用于打造出色的通用 Windows 平台应用的工具、功能和体验。Windows 10 build 10240 and the updated SDK provide the tools, features, and experiences to make remarkable Universal Windows Platform apps. 在 Windows 10 上安装这些工具和 SDK 后,你可以随时创建新的通用 Windows 应用或了解如何使用 Windows 上的现有应用代码After installing the tools and SDK on Windows 10, you’re ready to either create a new Universal Windows app or explore how you can use your existing app code on Windows.

下面按功能逐项查看 Windows 10 内部版本 10240(也称为 Windows 10 版本 1507)的新增功能。Here's a feature-by-feature look at what's new for you in Windows 10 build 10240 (Also known as Windows 10 version 1507).

自适应布局Adaptive layouts

功能Feature 说明Description
定制内容的多个视图Multiple Views for tailored content XAML 为定义共享同一代码文件的定制视图(.xaml 文件)提供了新的支持。XAML provides new support for defining tailored views (.xaml files) that share the same code file. 这使你能够更加轻松地创建和维护针对特定设备系列或方案定制的不同视图。This makes it easier for you to create and maintain different views that are tailored to a specific device family or scenario. 如果你的应用具有不同的 UI 内容、布局或导航模型(因针对不同的方案而具有明显差异),请生成多个视图。If your app has distinct UI content, layout, or navigation models that are drastically different for different scenarios, build multiple views. 例如,对于针对移动版应用的单手使用模式进行优化的导航菜单,你可以使用 Pivot;而对于针对桌面版应用的鼠标输入进行优化的导航菜单,你可以使用 SplitViewFor example, you might use a Pivot with navigation optimized for one-handed use on your mobile app, but use a SplitView with a navigation menu optimized for mouse on your desktop app.
StateTriggersStateTriggers 使用新的 VisualState.StateTriggers 功能,你可以基于窗口高度/宽度或者基于自定义触发器有条件地设置相关属性。Using the new VisualState.StateTriggers feature, you can conditionally set properties based on window height/width or based on a custom trigger. 之前,你必须在代码中处理 Window SizeChanged 事件并调用 VisualStateManager.GotoStatePreviously, you had to handle Window SizeChanged events in code and call VisualStateManager.GotoState.
SettersSetters 使用新的 VisualState.Setters 语法,你可以使用简化的标记定义 VisualStateManager 中的属性更改。Using the new VisualState.Setters syntax, you can use simplified markup to define property changes in VisualStateManager. 之前,你必须使用情节提要并创建动画来应用属性更改,例如将 StackPanel 的方向从水平更改为垂直。Previously, you had to use a Storyboard and create animations to apply property changes such as changing the orientation of a StackPanel from Horizontal to Vertical. 在通用 Windows 应用中,可以使用以下简单的 Setter 语法:In Universal Windows apps, you can use this simpler Setter syntax:

XAML 功能XAML features

功能Feature 说明Description
已编译的数据绑定 (x:Bind)Compiled data bindings (x:Bind) 在通用 Windows 应用中,你可以使用基于编译器的新绑定机制,该机制可通过 x:Bind 属性进行启用。In Universal Windows apps, you can use the new compiler-based binding mechanism enabled by the x:Bind property. 基于编译器的绑定属于强类型,并且会在编译时进行处理,这样速度既快又可以在绑定类型不匹配时提供编译时错误。Compiler-based bindings are strongly typed and processed at compile time, which is both faster and provides compile time errors when binding types are mismatched. 而且由于绑定已转换为经过编译的应用代码,因此你现在可以通过在 Visual Studio 中单步调试代码诊断具体的绑定问题来调试绑定。And because bindings are translated to compiled app code, you can now debug bindings by stepping through code in Visual Studio to diagnose specific binding issues. 你也可以使用 x:Bind 绑定到某个方法,如下所示: 对于典型的绑定方案,可以使用 x:Bind 代替 Binding,并获取改进的性能和可维护性。You can also use x:Bind to bind to a method, like this: For typical binding scenarios, you can use x:Bind in place of Binding, and get improved performance and maintainability.
列表的声明性增量呈现 (x:Phase)Declarative incremental rendering of lists (x:Phase) 在通用 Windows 应用中,新的 x:Phase 属性允许你使用 XAML(而非代码)执行列表的增量呈现或阶段性呈现。In Universal Windows apps, the new x:Phase attribute lets you perform incremental, or phased, rendering of lists using XAML instead of code. 当平移项目比较复杂的长列表时,你的应用可能无法以足够跟上平移速度的速度来呈现项目,从而为你的用户带来不良的体验。When panning long lists with complex items, your app might not be able to render items fast enough to keep up with the speed of panning, producing a poor experience for your users. 分阶段呈现使你可以指定列表项目中各个元素的呈现优先级,所以只有列表项目的最重要部分才会在快速平移时呈现。Phased rendering lets you specify the rendering priority of individual elements in a list item, so only the most important parts of the list item are rendered in fast panning scenarios. 这将为你的用户带来更为顺畅的平移体验。This produces a smoother panning experience for your user.

在 Windows 8.1 中,你可以处理 ContainerContentChanging 事件,并编写用于分阶段呈现列表项目的代码。In Windows 8.1, you could handle the ContainerContentChanging event and write code to render list items in phases. 在 UWP 应用中,你可以利用 x:Phase 属性以声明的方式完成分阶段呈现。In UWP apps, you can accomplish phased rendering declaratively using the x:Phase attribute. 将 x:Phase 与已编译的绑定 x:Bind 结合使用使你可以轻松地为数据模板中的每个绑定元素指定呈现优先级。Used in conjunction with compiled bindings x:Bind, x:Phase lets you easily specify a rendering priority for each bound element in a data template. 平移时,呈现项目的工作会根据阶段分成时间片,从而支持增量项目呈现。When panning, the work to render items is time-sliced based on the phase, which enables incremental item rendering.
UI 元素的延迟加载 (x:deferLoadstrategy)Deferred loading of UI elements (x:deferLoadstrategy) 在通用 Windows 应用中,新的 x:deferLoadstrategy 指令允许你指定要延迟加载的用户界面部分,从而改进启动性能并减少应用的内存使用量。In Universal Windows apps, the new x:deferLoadstrategy directive lets you specify parts of your user interface to be delay-loaded, which improves start-up performance and reduces the memory usage of your app. 例如,如果你的应用 UI 具有用于数据验证的元素,并且仅在输入不正确的数据时显示,则可以延迟加载该元素(除非需要显示)。For example, if your app UI has an element for data validation that is shown only when incorrect data is entered, you can delay loading of that element until it’s needed. 然后,元素对象不会在加载页面时创建;只有出现数据错误时或者需要添加到页面的可视化树时才会创建它们。Then, the element objects aren’t created when the page is loaded; instead, they’re created only when there’s a data error and they are needed to be added to the page’s visual tree.
SplitViewSplitView 借助新的 SplitView 控件,你可以轻松显示和隐藏瞬态内容。The new SplitView control gives you a way to easily show and hide transient content. 该控件通常用于“汉堡包菜单”之类的顶级导航方案,其中导航内容处于隐藏状态,可按需滑入作为用户操作的结果。It’s commonly used for top-level navigation scenarios like the "hamburger menu", where the navigation content is hidden, and slides in when needed as the result of a user action.
RelativePanelRelativePanel RelativePanel 是一种新型的布局面板,该面板允许你放置子对象并使其相互对齐或与父面板对齐。RelativePanel is a new layout panel that lets you position and align child objects in relation to each other or the parent panel. 例如,你可以指定某些文本应始终放置在该面板的左侧,某个按钮应始终在文本下方对齐。For example, you can specify that some text should always be positioned to the left side of the panel, and a Button should always align below the text. 当创建没有明确的线性模式的用户模式但却要求使用 StackPanelGrid 时,可使用 ReleativePanel。Use ReleativePanel when creating user interfaces that do not have a clear linear pattern that would call for use a StackPanel or Grid.
CalendarViewCalendarView 借助 CalendarView 控件,可使用基于月份的自定义视图轻松查看和选择日期以及日期范围。The CalendarView control makes it easy to view and select dates and date ranges using a customizable, month based view. CalendarView 支持相关功能,例如可将最小日期、最大日期和截止日期限制在可选的日期范围内。CalendarView supports features such as minimum, maximum, and blackout dates to limit which dates can be selected. 你还可以设置自定义密度栏,这些密度栏可用于显示某一天的计划的一般“细节”。You can also set custom density bars that can be used to show the general "fullness" of the schedule on a particular day.
CalendarDatePickerCalendarDatePicker CalendarDatePicker 是一个下拉式控件,该控件已针对从 CalendarView 选取某个日期进行了优化,尤其是能够显示诸如星期几或丰富的日历信息等上下文信息。CalendarDatePicker is a drop-down control that’s optimized for picking a single date from a CalendarView where contextual information like the day of the week or fullness of the calendar is important. 它类似于 DatePicker 控件,不过 DatePicker 是针对选取一个已知日期(例如出生日期)进行优化的。It’s similar to the DatePicker control, but the DatePicker is optimized for picking a known date, such as a date of birth.
MediaTransportControlsMediaTransportControls 借助新的 MediaTransportControls 类,可更轻松地自定义 MediaElement 的传输控件。The new MediaTransportControls class makes it easier to customize the transport controls of a MediaElement. 在 Windows 8.1 中,你可以启用 MediaElement 的内置传输控件,或通过调用 MediaElement 方法创建你自己的传输控件。In Windows 8.1, you could enable MediaElement’s built-in transport controls, or create your own transport controls that called MediaElement methods. 现在,你可以使用 MediaTransportControls 的内置功能,并且仍然可以轻松地自定义其外观,以适合你的应用。Now you can use the built-in functionality of MediaTransportControls, and still easily customize the look to suit your app.
属性更改通知Property change notifications 在通用 Windows 应用中,你可以侦听 DependencyObjects 上的属性更改,即便是属性没有对应的更改事件也是如此。In Universal Windows apps, you can listen for property changes on DependencyObjects, even for properties that don’t have corresponding change events. 该通知会像事件一样运行,但实际上作为回调公开。The notification operates like an event, but is actually exposed as a callback. 该回调会像事件处理程序一样采用发送者参数,但不会采用事件参数。The callback takes a sender argument just like an event handler, but doesn’t take an event argument. 仅传递属性标识符以指示何种属性。Instead, only the property identifier is passed to indicate which property. 借助此信息,你的应用可以为多个属性通知定义单个处理程序。With this info your app can define a single handler for multiple property notifications. 有关详细信息,请参阅 RegisterPropertyChangedCallbackUnregisterPropertyChangedCallbackFor more info, see RegisterPropertyChangedCallback and UnregisterPropertyChangedCallback.
地图Maps 已更新为提供 3D 鸟瞰图和街景视图的 MapControl 类。The MapControl class been updated to provide aerial 3D imagery and street-level views. 这些新功能和早期的映射功能现在可用于通用 Windows 应用。These new features and earlier mapping functionality are now available to Universal Windows apps. 使用以下 API 向应用添加地图功能:Windows.UI.Xaml.Controls.MapsWindows.Services.MapsAdd mapping to your app with the following APIs: Windows.UI.Xaml.Controls.Maps and Windows.Services.Maps. 若要立即开始在通用 Windows 应用中使用这些 API,请从必应地图开发人员中心请求一个密钥。To start using these APIs in a Universal Windows app today, request a key from the Bing Maps Developer Center. 有关详细信息,请参阅如何验证地图应用For more info, see How to authenticate a Maps app. Windows 10 还有一个新增功能,即电脑和手机用户可以从“设置”应用下载离线地图。Also new for Windows 10, PC and phone users can download offline maps from the Settings app. 当 Internet 访问不可用时,MapControl 可使用脱机地图(如果可用)来显示地图。When available, offline maps are used by the MapControl to display maps when no internet access is available.
输入按钮映射Input button mapping Windows.UI.Xaml.Input.KeyEventArgs 类具有新的 OriginalKey 属性以及对 Windows.System.VirtualKey 所做的相应更新,从而让你可以获取与键盘输入事件关联的原始且未映射的输入按钮。The Windows.UI.Xaml.Input.KeyEventArgs class has a new OriginalKey property that, along with a corresponding update to Windows.System.VirtualKey, enables you to get the original, unmapped input button associated with the keyboard input event.
墨迹书写Inking 借助 InkCanvas 控件和基础 InkPresenter 类,现在可以更容易地使用采用 C++、C# 或 Visual Basic 的 Windows 运行时应用中功能强大的墨迹功能。It’s now simpler to use the robust inking functionality in Windows Runtime apps using C++, C#, or Visual Basic, thanks to the InkCanvas control and underlying InkPresenter classes. InkCanvas 控件定义了一个用于绘制和呈现墨迹笔划的覆盖区域。The InkCanvas control defines an overlay area for drawing and rendering ink strokes. 此控件的功能(输入、处理和呈现)源自 InkPresenterInkStrokeInkRecognizersInkSynchronizer 类。The functionality for this control (input, processing, and rendering) comes from the InkPresenter, InkStroke, InkRecognizers, and InkSynchronizer classes. 重要说明: 这些类在使用 JavaScript 的 Windows 应用中不受支持。Important: These classes are not supported in Windows apps using JavaScript.

已更新的 XAML 功能Updated XAML features

功能Feature 说明Description
CommandBar 和 AppBar 更新CommandBar and AppBar updates CommandBarAppBar 控件已针对跨设备系列的 UWP 应用更新为具有一致的 API、行为和用户体验。The CommandBar and AppBar controls have been updated to have a consistent API, behavior and user experience for UWP apps across device families.

适用于通用 Windows 应用的 CommandBar 控件已得到了改进,从而可提供 AppBar 功能的超集,并且针对如何将其用于你的应用提供了更大的灵活性。The CommandBar control for Universal Windows apps has been improved to provide a superset of AppBar functionality and greater flexibility in how you can use it in your app. 对于 Windows 10 上所有新的通用 Windows 应用,应使用 CommandBar。You should use CommandBar for all new Universal Windows apps on Windows 10. 在 Windows 8.1 的 CommandBar 中,你只能使用已实现 ICommandBarElement 的控件,如 AppBarButtonIn a CommandBar in Windows 8.1, you could use only controls that implemented ICommandBarElement, like AppBarButton. 在通用 Windows 应用中,除了 AppBarButtons 外,你现在还可以将自定义内容放入 CommandBar 中。In Universal Windows apps, you can now put custom content in the CommandBar in addition to AppBarButtons.

AppBar 控件已得到了更新,以便你可以更加轻松地将使用 AppBar 的 Windows 8.1 应用移动到通用 Windows 平台。The AppBar control has been updated to let you more easily move your Windows 8.1 apps that use AppBar to the Universal Windows Platform. AppBar 设计为可与全屏应用一起使用并且可通过边缘手势进行调用。AppBar was designed to be used with full-screen apps, and to be invoked using edge gestures. 控件更新考虑到了 Windows 10 中窗口化应用和缺少边缘手势等问题。Updates to the control account for issues such as windowed apps and the lack of edge gestures in Window 10.

之前仅在 Windows Phone 上提供的隐藏 AppBar.ClosedDisplayMode 现在在所有设备系列上均受支持,从而让你可以在不同的命令提示级别之间选择。The Hidden AppBar.ClosedDisplayMode, previously only on Windows Phone, is now supported on all device families, letting you choose between different levels of hints for commands. AppBar 默认情况下显示最少内容的提示,以便在将你的 Windows 8.1 应用升级到通用 Windows 应用时能为你提供一致性,不过你将无法再依赖平台中的边缘手势支持。The AppBar shows a minimal hint by default to provide consistency for you when upgrading your Windows 8.1 apps to Universal Windows apps where you can no longer rely on the edge gesture support in the platform.
GridView 更新GridView updates 在 Windows 10 之前,默认的 GridView 布局方向在 Windows 上为水平方向,而在 Windows Phone 上为垂直方向。Prior to Windows 10, the default GridView layout orientation was horizontal on Windows and vertical on Windows Phone. 在 UWP 应用中,GridView 默认情况下针对所有设备系列使用垂直布局,以确保你能获得一致的默认体验。In UWP apps, GridView uses a vertical layout by default for all device families to ensure you have by consistent default experience.
AreStickyGroupHeadersEnabled 属性AreStickyGroupHeadersEnabled property 当你在 ListViewGridView 中显示分组数据时,组标头将在列表滚动时保持可见状态。When you show grouped data in a ListView or GridView, the group headers now remain visible when the list is scrolled. 这在大型数据集中很重要,因为标头会提供用户正在查看的数据的上下文。This is important in large data sets where the header provides context for the data the user is viewing. 但是,如果每组中只有几个元素,你可能需要将这些标头滚动到具有这些项目的屏幕之外。However, in cases where there are only a few elements in each group, you might want to have the headers scroll off-screen with the items. 你可以通过设置 ItemsStackPanelItemsWrapGrid 上的 AreStickyGroupHeadersEnabled 属性控制此行为。You can set the AreStickyGroupHeadersEnabled property on ItemsStackPanel and ItemsWrapGrid to control this behavior.
GroupHeaderContainerFromItemContainer 方法GroupHeaderContainerFromItemContainer method 当你在 ItemsControl 中显示分组数据时,你可以通过调用 GroupHeaderContainerFromItemContainer 方法,获取对该组父标头的引用。When you show grouped data in an ItemsControl, you can call the GroupHeaderContainerFromItemContainer method to get a reference to the parent header for the group. 例如,如果用户删除组中的最后一项,你可以获取对组标头的引用,并且可以同时删除该项和组标头。For example, if a user deletes the last item in a group, you can get a reference to the group header and remove both the item and group header together.
ChoosingGroupHeaderContainer 事件ChoosingGroupHeaderContainer event 借助 ListViewBase 上的新 ChoosingGroupHeaderContainer 事件,你可以在 ListView 或 GridView 中设置组标头的状态。The new ChoosingGroupHeaderContainer event on ListViewBase lets you set state on the group headers in a ListView or GridView. 例如,你可以通过处理此事件,将组标头上的 AutomationProperties.Nameproperty 设置为借助辅助技术来标识该组。For example, you might handle this event to set the AutomationProperties.Nameproperty on the group header to represent the group in assistive technologies.
ChoosingItemContainer 事件ChoosingItemContainer event 借助 ListViewBase 上的新 ChoosingItemContainer 事件,你可以更好地控制 ListViewGridView 中的 UI 虚拟化。The new ChoosingItemContainer event on ListViewBase gives you greater control over UI virtualization in a ListView or GridView. 将此事件与 ContainerContentChanging 事件结合使用,以保持你自己的要根据需要利用的回收容器的队列。Use this event in conjunction with the ContainerContentChanging event to maintain your own queue of recycled containers from which to draw upon as needed. 例如,如果由于筛选而重置了数据源,你可以快速地将一组已创建好的视觉效果 (ItemContainers) 与其数据匹配,以便实现最佳性能。For example, if the data source has been reset due to filtering, you can quickly match an already created set of visuals (ItemContainers) with their data to achieve best performance.
列表滚动虚拟化List scrolling virtualization XAML ListViewGridView 控件中有一个新 ListViewBase.ChooseingItemContainer 事件,该事件可在数据集合中发生更改时改进控件的性能。The XAML ListView and GridView controls have a new ListViewBase.ChooseingItemContainer event that improves the performance of the control when a change occurs in the data collection. 现在,系统将维护当前视图中的项目以及焦点和选择状态,而不是完全重置列表,以免重播进入动画;视口中新建和已删除的项目会流畅地以动画方式进入和离开。Instead of doing a complete reset of the list, which replays the entrance animation, the system now maintains items currently in view, along with focus and selection state; new and removed items in the viewport animate in and out smoothly. 一旦未破坏的容器中的数据集合发生变化,应用即可快速将所有“旧”项与其之前的容器匹配,并跳过容器生命周期替代方法的进一步处理。After a change in the data collection in which containers are not destroyed, an app can quickly match any "old" items with their previous container and skip further processing of container-lifecycle override methods. 仅“新”项得到处理并与回收的容器或新容器相关联。Only "new" items are processed and associated with recycled or new containers.
SelectRange 方法和 SelectedRanges 属性SelectRange method and SelectedRanges property 在通用 Windows 应用中,借助 ListViewGridView 控件,你现在可以根据项目索引的范围(而非项目对象引用)选择相应项目。In Universal Windows apps, ListView and GridView controls now let you select items in terms of ranges of item indexes instead of item object references. 使用此方法描述项目选择更有效率,因为不需要为每个所选的项目创建项目对象。This is a more efficient way to describe item selection because item objects don’t need to be created for each selected item. 有关详细信息,请参阅 ListViewBase.SelectedRangesListViewBase.SelectRangeListViewBase.DeselectRangeFor more info, see ListViewBase.SelectedRanges, ListViewBase.SelectRange, and ListViewBase.DeselectRange.
新的 ListViewItemPresenter APINew ListViewItemPresenter APIs ListViewGridView 使用项目表示器来提供默认的视觉对象,以供选择和着重显示。ListView and GridView use item presenters to provide the default visuals for selection and focus. 在 UWP 应用中,ListViewItemPresenterGridViewItemPresenter 具有新的属性,以便你可以针对列表项目进一步自定义视觉对象。In UWP apps, ListViewItemPresenter and GridViewItemPresenter have new properties that let you further customize visuals for list items. 新增的属性为 heckBoxBrush、CheckMode、FocusSecondaryBorderBrush、PointerOverForeground、PressedBackground 和 SelectedPressedBackground。The new properties are CheckBoxBrush, CheckMode, FocusSecondaryBorderBrush, PointerOverForeground, PressedBackground, and SelectedPressedBackground.
SemanticZoom 更新SemanticZoom updates 对于跨所有设备系列的 UWP 应用,SemanticZoom 控件现在具有一致的行为。The SemanticZoom control now has one consistent behavior for UWP apps across all device families. 在放大视图和缩小视图之间进行切换的默认操作是点击放大视图中的组标头。The default action to switch between the zoomed in view and the zoomed out view is to tap on a group header in the zoomed in view. 这与 Windows Phone 8.1 中的行为相同,但与 Windows 8.1 中的行为不同,对于后者,可使用收缩手势进行缩放。This is the same as the behavior on Windows Phone 8.1, but is a change from Windows 8.1, which used the pinch gesture to zoom. 若要使用收缩手势更改视图,应在 SemanticZoom 的内部 ScrollViewer 上设置 ScrollViewer.ZoomMode="Enabled"。To change views using pinch-to- zoom, set ScrollViewer.ZoomMode="Enabled" on the SemanticZoom’s internal ScrollViewer.

对于通用 Windows 应用,缩小视图会替换放大视图,并且大小与其替换的视图相同。For Universal Windows apps, the zoomed out view replaces the zoomed in view and is the same size as the view that it replaced. 这与 Windows 8.1 中的行为相同,但与 Windows Phone 8.1 中的行为不同,对于后者,缩小视图的大小占据了整个屏幕,并且在所有其他内容之上呈现。This is the same as the behavior on Windows 8.1, but is a change from Windows Phone 8.1, where the zoomed out view took up the full size of the screen and was rendered on top of all other content.
DatePicker 和 TimePicker 更新DatePicker and TimePicker updates 对于跨所有设备系列的通用 Windows 应用,DatePickerTimePicker 控件现在具有一个一致的实现。The DatePicker and TimePicker controls now have one consistent implementation for Universal Windows apps across all device families. 它们还具有适用于 Windows 10 的新外观。They also have a new look for Windows 10. 控件的弹出部分现在可在所有设备上使用 DatePickerFlyoutTimePickerFlyout 控件。The pop-up portion of the control now uses DatePickerFlyout and TimePickerFlyout controls on all devices. 这与 Windows Phone 8.1 上的此类行为相同,不过在 Windows 8.1 上有所变动,因为其中使用了 ComboBox 控件。This is the same as the behavior on Windows Phone 8.1, but is a change from Windows 8.1, which used ComboBox controls. 使用浮出控件可让你更轻松地创建自定义的日期和时间选取器。Using the flyout controls lets you easily create customized date and time pickers.
新的 ScrollViewer APINew ScrollViewer APIs ScrollViewer 具有新的 DirectManipulationStartedDirectManipulationCompleted 事件,可在触摸平移开始和停止时通知应用。ScrollViewer has new DirectManipulationStarted and DirectManipulationCompleted events to notify your app when touch panning starts and stops. 你可以处理这些事件以使你的 UI 与这些用户操作相协调。You can handle these events to coordinate your UI with these user actions.
MenuFlyout 更新MenuFlyout updates 在通用 Windows 应用中,有一些新的 API 使你可以更轻松地生成更好的上下文菜单。In Universal Windows apps, there are new APIs that let you build better context menus more easily. MenuFlyout.ShowAt 方法使你可以指定你希望浮出控件相对于其他元素的出现位置。The new MenuFlyout.ShowAt method lets you specify where you want the flyout to appear in relation to another element. (MenuFlyout 甚至可与应用窗口的边界重叠。)使用新的 MenuFlyoutSubItem 类创建级联菜单。(And your MenuFlyout can even overlap the boundaries of your app’s window.) Use the new MenuFlyoutSubItem class to create cascading menus.
ContentPresenter、Grid 和 StackPanel 的新 Border 属性New Border properties for ContentPresenter, Grid, and StackPanel 常见容器控件具有新的边框属性,可用于在其周围绘制边框,而无需向你的 XAML 添加其他 Border 元素。Common container controls have new border properties that let you draw a border around them without adding an additional Border element to your XAML. ContentPresenterGridStackPanel 包含以下新属性:BorderBrush、BorderThickness、CornerRadius 和 Padding。ContentPresenter, Grid, and StackPanel have these new properties: BorderBrush, BorderThickness, CornerRadius, and Padding.
ContentPresenter 上的新文本 APINew text APIs on ContentPresenter ContentPresenter 包含的新 API 可让你更好地控制文本显示:LineHeight、LineStackingStrategy、MaxLines 和 TextWrapping。ContentPresenter has new APIs that give you more control over text display: LineHeight, LineStackingStrategy, MaxLines, and TextWrapping.
系统焦点视觉效果System Focus Visuals XAML 控件的焦点视觉效果现在由系统创建,而不是作为 XAML 元素在控件模板中声明。Focus visuals for XAML controls are now created by the system, instead of being declared as XAML elements in the control template. 在移动设备上,通常不需要焦点视觉效果,让系统根据需要创建并管理它们可提升性能。The focus visuals are not typically needed on mobile devices, and letting the system create and manage them as needed improves app performance. 如果你需要更好地控制焦点视觉效果,可以替代系统行为并提供定义焦点视觉效果的自定义控件模板。If you need greater control over focus visuals, you can override the system behavior and providing a custom control template that defines focus visuals. 有关详细信息,请参阅 UseSystemFocusVisualsIsTemplateFocusTargetSee UseSystemFocusVisuals and IsTemplateFocusTarget for more info.
PasswordBox.PasswordRevealModePasswordBox.PasswordRevealMode 在通用 Windows 应用中,PasswordRevealMode 属性将替换 IsPasswordRevealButtonEnabled 属性,以跨设备系列提供一致的行为。In Universal Windows apps, the PasswordRevealMode property replaces the IsPasswordRevealButtonEnabled property to provide consistent behavior across device families. 警告: 在 Windows 10 之前,密码显示按钮默认情况下不显示;在通用 Windows 应用中,将在默认情况下显示。Caution: Prior to Windows 10, the password reveal button was not shown by default; in Universal Windows apps it is shown by default. 如果应用安全要求始终掩盖密码,请确保将 PasswordRevealMode 设置为 Hidden。If the security of your app requires that the password is always obscured, be sure to set PasswordRevealMode to Hidden.
Control.IsTextScaleFactorEnabledControl.IsTextScaleFactorEnabled 以前可在 Windows Phone 8.1 上使用的 IsTextScaleFactorEnabled 属性现在可用于所有设备系列上的通用 Windows 应用。The IsTextScaleFactorEnabled property that was available on Windows Phone 8.1 is now available for Universal Windows apps across all device families.
AutoSuggestBoxAutoSuggestBox Windows Phone 8.1 中的 AutoSuggestBox 控件现在可用于所有设备系列上的通用 Windows 应用,你应使用它而不是 SearchBoxThe AutoSuggestBox control from Windows Phone 8.1 is now available for Universal Windows apps across all device families, and you should use it instead of SearchBox. AutoSuggestBox 在用户键入时即提供建议,与各种输入类型相辅相成,如触摸、键盘和输入法编辑器。AutoSuggestBox provides suggestions as the user types, and works well with various input types, like touch, keyboard, and Input Method Editors. 它还具有一些可使之更好地发挥搜索框作用的新成员:QueryIcon 属性和 QuerySubmitted 事件。It also has some new members to make it work better as a search box: the QueryIcon property and the QuerySubmitted event.
ContentDialogContentDialog Windows Phone 8.1 中的 ContentDialog 控件现在可用于所有设备系列上的通用 Windows 应用。The ContentDialog control from Windows Phone 8.1 is now available for Universal Windows apps across all device families. ContentDialog 可用于显示可在所有系列的设备上完美运行的自定义模式对话框。ContentDialog lets you display a customizable modal dialog that works great across the full spectrum of devices.
PivotPivot Windows Phone 8.1 中的 Pivot 控件现在可用于所有设备系列上的通用 Windows 应用。The Pivot control from Windows Phone 8.1 is now available for Universal Windows apps across all device families. 现在,你可以将相同的 Pivot 控件用于你的移动和桌面设备应用。You can now use the same Pivot control for in your app for mobile and desktop devices. Pivot 基于屏幕大小和输入类型提供自适应行为。Pivot provides adaptive behavior based on the screen size and input type. 你可以设置 Pivot 控件的样式,以提供类似选项卡的行为,每个透视项中包含不同的信息视图。You can style a Pivot control to provide tab-like behavior, with different views of information in each pivot item.


功能Feature 说明Description
Windows 核心文本 APIWindows core text APIs 新的 Windows.UI.Text.Core 命名空间具有一个客户端-服务器系统功能,该系统可将键盘输入处理集中到单个服务器。The new Windows.UI.Text.Core namespace features a client-server system that centralizes the processing of keyboard input into a single server. 你可以使用它来操作自定义文本输入控件的编辑缓冲区。You can use it to manipulate the edit buffer of your custom text input control. 文本输入服务器通过应用和服务器之间的异步信道确保文本输入控件的内容及其编辑缓冲区的内容始终处于同步状态。The text input server ensures that the contents of your text input control and the contents of its own edit buffer are always in sync, via an asynchronous communication channel between the app and the server.
矢量图标Vector icons Glyphs 元素具有新的 IsColorFontEnabledColorFontPalleteIndex 属性,可支持彩色字体;现在,你可以使用字体文件呈现基于字体的图标。The Glyphs element has the new IsColorFontEnabled and ColorFontPalleteIndex properties to support color fonts; now you can use a font file to render font-based icons. 在将 ColorFontPalleteIndex 用于调色板切换时,可使用不同的颜色组合呈现一个图标;例如,显示该图标的启用和禁用版本。When you use ColorFontPalleteIndex for color palette switching, a single icon can be rendered with different color sets; for example, to show an enabled and disabled version of the icon.
输入法编辑器窗口事件Input Method Editor window events 用户有时会通过在文本输入框正下方的窗口中显示的输入法编辑器输入文字(通常用于东亚语言)。Users sometimes enter text through an Input Method Editor that shows in a window just below a text input box (typically for East Asian languages). 若要使你的应用 UI 与 IME 窗口相得益彰,你可以对 TextBoxRichEditBox 使用 CandidateWindowBoundsChanged 事件和 DesiredCandidateWindowAlignment 属性。You can use the CandidateWindowBoundsChanged event and DesiredCandidateWindowAlignment property on TextBox and RichEditBox to make your app UI work better with the IME window.
文本排版事件Text composition events TextBoxRichEditBox 包含新的事件,以便在使用输入法编辑器撰写文本时通知应用:TextCompositionStarted、TextCompositionEnded 和 TextCompositionChanged。TextBox and RichEditBox have new events to inform your app when text is composed using an Input Method Editor: TextCompositionStarted, TextCompositionEnded, and TextCompositionChanged. 你可以处理这些事件以使你的应用代码与 IME 文本排版过程相协调。You can handle these events to coordinate your app code with the IME text composition process. 例如,你可以针对东亚语言实现内联式自动完成功能。For example, you could implement inline auto-completion functionality for East Asian languages.
改进对双向文本的处理Improved handling of bi-directional text XAML 文本控件的新 API 可改进对双向文本的处理,从而在各种输入语言中更好地实现文本对齐和段落方向性。XAML text controls have new API to improve handling of bi-directional text, resulting in better text alignment and paragraph directionality across a variety of input languages. TextReadingOrder 属性的默认值已更改为 DetectFromContent,因此对检测读取顺序的支持在默认情况下处于启用状态。The default value of the TextReadingOrder property has been changed to DetectFromContent, so support for detecting reading order is enabled by default. TextReadingOrder 属性也已添加到 PasswordBox、RichEditBox 和 TextBox。The TextReadingOrder property has also been added to PasswordBox, RichEditBox, and TextBox. 若要选择从内容自动检测对齐方式,可以将文本控件的 TextAlignment 属性设置为新的 DetectFromContent 值。You can set the TextAlignment property on text controls to the new DetectFromContent value to opt-in to having alignment detected automatically from the content.
文本呈现Text rendering 在 Windows 10 中,XAML 应用中的文本呈现速度现在大多比 Windows 8.1 将近快两倍。In Windows 10, text in XAML apps now renders, in most situations, at nearly twice the speed of Windows 8.1. 在大多数情况下,你的应用将受益于这一改进,而无需进行任何更改。In most cases, your apps will benefit from this improvement without any changes. 除了更快地呈现之外,这些改进还降低了 5% 的 XAML 应用典型内存消耗。In addition to faster rendering, these improvements also reduce typical memory consumption of XAML apps by 5%.

应用程序模型Application model

功能Feature 说明Description
CortanaCortana 通过语音命令扩展 Cortana 的基本功能,这些命令用于在外部应用程序中启动并执行一个单独操作。Extend the basic functionality of Cortana with voice commands that launch and execute a single action in an external application. 通过集成应用的基本功能,并通过为用户提供中心入口点以在无需直接打开应用的情况下完成大多数任务,Cortana 可以充当应用和用户之间的联络人。By integrating the basic functionality of your app, and by providing a central entry point for the user to accomplish most of the tasks without opening your app directly, Cortana can act as a liaison between your app and the user. 在大多数情况下,这可以为用户节省大量时间和精力。In many cases, this can save the user significant time and effort. 了解如何将应用集成到 Cortana 画布Learn how to integrate your app into the Cortana canvas. 如果你需要创意,可以参考通用 Windows 应用设计基础知识中特定于 Cortana 的设计建议和 UX 指南。If you need ideas you can refer to the design recommendations and UX guidelines specific to Cortana in Design basics for Universal Windows apps.
文件资源浏览器File Explorer 新的 Windows.System.Launcher.LaunchFolderAsync 方法允许你启动文件资源管理器并显示所指定的文件夹的内容。The new Windows.System.Launcher.LaunchFolderAsync methods let you launch File Explorer and displays the contents of a folder that you specify.
共享存储Shared storage 新的 Windows.ApplicationModel.DataTransfer.SharedStorageAccessManager 类及其方法允许你与另一个应用共享文件,方法是当通过使用 URI 激活启动另一个应用时,传递一个共享标记。The new Windows.ApplicationModel.DataTransfer.SharedStorageAccessManager class and its methods let you share a file with another app by passing a sharing token when you launch the other app by using URI activation. 目标应用会兑换令牌以获取源应用共享的文件。The target app redeems the token to get the file shared by the source app.
SettingsSettings 通过将 ms-settings 协议与 LaunchUriAsync 方法结合使用,显示内置的设置页面。Display built-in settings pages by using the ms-settings protocol with the LaunchUriAsync method. 例如,以下代码显示 WLAN 设置页面:bool result = await Launcher.LaunchUriAsync(new Uri("ms-settings://network/wifi"));For example, the following code displays the page of Wi-Fi settings: bool result = await Launcher.LaunchUriAsync(new Uri("ms-settings://network/wifi"));

有关可以显示的设置页面列表,请参阅如何使用 ms-settings 协议显示内置设置页面For a list of the settings pages that you can display, see How to display built-in settings pages by using the ms-settings protocol.
应用到应用的通信App-to-App communication 通过 Windows 10 中新增的应用到应用的通信 API,Windows 应用程序(以及 Windows Web 应用程序)可以相互启动并交换数据和文件。New app-to-app communication APIs in Windows 10 make it possible for Windows applications (as well as Windows Web applications) to launch each other and exchange data and files. 利用这些新 API,使得原本需要用户使用多个应用程序才能完成的复杂任务现在可以无缝地进行处理。Using these new APIs, complex tasks that would have required the user to use multiple applications can now be handled seamlessly. 例如,你的应用可启动社交网络应用来选择联系人,或启动结算应用程序来完成支付流程。For example, your app could launch a social networking app to choose a contact, or launch a checkout application to complete a payment process.
应用服务App services 应用服务是应用在 Windows 10 中向其他应用提供服务的方法。An app service is a way for an app to provide services to other apps in Windows 10. 应用服务的表现形式为后台任务。An app service takes the form of a background task. 前台应用可以调用其他应用中的应用服务以在后台执行任务。Foreground apps can call an app service in another app to perform tasks in the background. 有关应用服务 API 的参考信息,请参阅 Windows.ApplicationModel.AppServiceFor reference information about the app service API, see Windows.ApplicationModel.AppService.
应用包清单App package manifest 对 Windows 10 的程序包清单架构参考的更新包括已添加、已删除和已更改的元素。Updates to the package manifest schema reference for Windows 10 include elements that have been added, removed, and changed. 有关该架构中所有元素、属性和类型的参考信息,请参阅元素层次结构See Element Hierarchy for reference info on all elements, attributes, and types in the schema.


功能Feature 说明Description
Microsoft Surface HubMicrosoft Surface Hub Microsoft Surface Hub 是一款强大的团队协作设备和大屏幕平台,适用于在 Surface Hub 或连接的设备中以本机方式运行的通用 Windows 应用。The Microsoft Surface Hub is a powerful team collaboration device and a large-screen platform for Universal Windows apps that run natively from Surface Hub or from your connected device. 针对自己的业务生成可以利用大屏幕、触摸和墨迹输入以及各种板载硬件(如相机和传感器)的应用。Build your own apps, designed specifically for your business, that take advantage of the large screen, touch and ink input, and extensive onboard hardware like cameras and sensors.

请参阅通用 Windows 应用设计基础知识中特定于 Surface Hub 的设计建议和 UX 指南。Have a look at the design recommendations and UX guidelines specific to Surface Hub in Design basics for Universal Windows apps. 这些文档介绍了通用 Windows 应用的响应式设计技术。These docs explain responsive design techniques for Universal Windows apps.

有关支持社区共享应用的详细信息,请参阅 SharedModeSettingsFor detail on supporting communal shared apps, see SharedModeSettings. 有关墨迹输入以及在 InkCanvas 控件上支持多点墨迹的详细信息,请参阅 Windows.UI.Input.InkingWindows.UI.Input.Inking.CoreFor ink input and detail on support for multi-point inking on the new InkCanvas control, see Windows.UI.Input.Inking and Windows.UI.Input.Inking.Core. 有关处理传感器输入的信息,请参阅集成设备、打印机和传感器For handling sensor input, see Integrating devices, printers, and sensors.
位置Location Windows 10 引入了一个新方法 RequestAccessAsync 来提示用户提供其位置的访问权限。Windows 10 introduces a new method to prompt the user for permission to access their location, RequestAccessAsync. 用户可通过 “设置” 应用中的 “位置隐私设置” 来设置其位置数据隐私。The user sets the privacy of their location data with the location privacy settings in the Settings app. 仅当出现以下情况时,你的应用才可以访问用户的位置:“此设备的位置”已打开(不适用于 Windows 10 手机版)、位置服务设置“位置”已打开,并且在“选择可以使用你的位置信息的应用”下,你的应用已设置为打开 。Your app can access the user's location only when: Location for this device is turned on (not applicable for Windows 10 for phones), the location services setting “Location” is on, and under Choose apps that can use your location, your app is set to on.

在访问用户的位置之前,务必调用 RequestAccessAsyncIt's important to call RequestAccessAsync before accessing the user’s location. 此时,你的应用必须位于前台,并且 RequestAccessAsync 必须从 UI 线程中进行调用。At that time, your app must be in the foreground and RequestAccessAsync must be called from the UI thread. 除非用户向你的应用授予访问其位置的权限,否则你的应用将无法访问位置数据。Until the user grants your app permission to their location, your app can't access location data.
AllJoynAllJoyn Windows.Devices.AllJoyn Windows 运行时命名空间引入了 Microsoft 实现的 AllJoyn 开放源代码软件框架和服务。The Windows.Devices.AllJoyn Windows Runtime namespace introduces Microsoft's implementation of the AllJoyn open source software framework and services. 这些 API 使通用 Windows 设备应用可以在物联网 (IoT) 应用场景中参与到 AllJoyn 驱动的其他设备中。These APIs make it possible for your Universal Windows device app to participate with other devices in AllJoyn-driven, Internet of Things (IoT) scenarios. 有关 AllJoyn C API 的详细信息,请在 AllSeen Alliance 处下载相关文档。For more details about the AllJoyn C APIs, download the documentation at The AllSeen Alliance. 使用该版本中所包含的 AllJoynCodeGen 工具,生成可用于在设备应用中启用 AllJoyn 方案的 Windows 组件。Use the AllJoynCodeGen tool included in this release to generate a Windows component that you can use to enable AllJoyn scenarios in your device app.

注意: Windows 10 IoT 核心版现在可用于新类型的小型设备,从而允许你使用 Windows 和 Visual Studio 创建“物联网”(IoT) 设备。Note: Windows 10 IoT Core is now available for a new class of small devices, allowing you to create “Internet of Things” (IoT) devices using Windows and Visual Studio. Windows 开发人员中心中了解关于 Windows IoT 的详细信息。Learn more about Windows IoT on Windows Dev Center.
在移动设备 (XAML) 上打印 APIPrinting APIs on mobile (XAML) 有一组单独且统一的 API 使你可以在各设备系列(包括移动设备)中基于 XAML 的 UWP 应用内进行打印。There is a single, unified set of APIs that let you print from your XAML-based UWP apps across device families, including mobile devices. 现在,你可以从 Windows.Graphics.Printing 和 Windows.UI.Xaml.Printing 命名空间使用熟悉的与打印相关的 API,将打印添加到你的移动应用。You can now add printing to your mobile app by using familiar printing-related APIs from the Windows.Graphics.Printing and Windows.UI.Xaml.Printing namespaces.
电池Battery 通过 Windows.Devices.Power 命名空间中的电池 API,你的应用可了解连接到正在运行该应用的设备的所有电池的详细信息。The battery APIs in the Windows.Devices.Power namespace let your app learn more about any batteries that are connected to the device that’s running your app. 通过创建 Battery 对象来表示单个电池控制器或聚合的所有电池控制器(在它们分别由 FromIdAsyncAggregateBattery 创建后)。Create a Battery object to represent an individual battery controller or an aggregate of all battery controllers (when created by FromIdAsync or AggregateBattery, respectively). 使用 GetReport 方法返回 BatteryReport 对象,该对象可指示相应电池的充电、容量和状态。Use the GetReport method to return a BatteryReport object that indicates the charge, capacity, and status of the corresponding batteries.
MIDI 设备MIDI devices 新的 Windows.Devices.Midi 命名空间可以让你创建能够与外部 MIDI 设备通信的 A=apps、直接与 Microsoft GS MIDI 软件合成器通信的应用和外部设备,以及多个客户端同时访问单个 MIDI 端口的方案。The new Windows.Devices.Midi namespace lets you create A=apps that can communicate with external MIDI devices, Apps and external devices that directly communicate with the Microsoft GS MIDI software synthesizer, and scenarios where multiple clients simultaneously access a single MIDI port.
自定义传感器支持Custom sensor support Windows.Devices.Sensors.Custom 命名空间允许硬件开发人员定义新的自定义传感器类型,例如 CO2 传感器。The Windows.Devices.Sensors.Custom namespace allows hardware developers to define new custom sensor types, like a CO2 sensor.
基于主机的卡仿真 (HCE)Host-based Card Emulation (HCE) 主机卡仿真使你能够实现操作系统中托管的 NFC 卡仿真服务,并且仍可以通过 NFC 射频与外部读取器终端进行通信。Host card emulation enables you to implement NFC card emulation services hosted in the OS and still be able to communicate with the external reader terminal via NFC radio. 若要触发后台任务以通过 NFC 模拟智能卡,请使用 SmartCardTrigger 类。To trigger a background task to emulate a smartcard via NFC, use the SmartCardTrigger class. SmartCardTriggerType 枚举中的 EmulatorHostApplicationActivated 值会让你的应用知道 HCE 事件已发生。The EmulatorHostApplicationActivated value in the SmartCardTriggerType enum lets your app know that an HCE event has occurred.


功能Feature 说明Description
DirectXDirectX Windows 10 中的 DirectX 12 引入了下一版本的 Microsoft Direct3D,它是 DirectX 的核心 3D 图形 API。DirectX 12 in Windows 10 introduces the next version of Microsoft Direct3D, the 3D graphics API at the heart of DirectX. Direct3D 12 图形可实现类似控制台的低级别 API 的效率和性能。Direct3D 12 Graphics enables the efficiency and performance of a low-level, console-like API. Direct3D 12 比以往更快且更有效率。Direct3D 12 is faster and more efficient than ever before. 它可以实现更丰富的场景、更多的对象、更复杂的效果,并且可以更好地利用现代图形硬件。It enables richer scenes, more objects, more complex effects, and better use of modern graphics hardware.
SoftwareBitmapSourceSoftwareBitmapSource 在通用 Windows 应用中,你可以使用新的 SoftwareBitmapSource 类型作为 XAML 图像源。In Universal Windows apps, you can use the new SoftwareBitmapSource type as a XAML image source. 这样,你可以将未编码图像传递到 XAML 框架,以便立即在屏幕上显示,从而通过 XAML 框架绕过图像解码。This lets you pass un-encoded images to the XAML framework to be immediately displayed on screen, bypassing image decoding by the XAML framework. 你可以实现更快的图像呈现,如直接从相机呈现低延迟的照片、使用自定义图像解码器、从 DirectX 表面捕获帧或从头开始创建内存中的图像,并通过低延迟和低内存开销的方式直接在 XAML 中将其全部呈现。You can achieve much faster image rendering, such as rendering low-lag photos directly from the camera, using custom image decoders, capturing frames from DirectX surfaces, or even creating in-memory images from scratch and rendering them all directly in XAML with low latency and low memory overhead.
透视相机Perspective Camera 在通用 Windows 应用中,XAML 具有全新 Transform3D API,它可用于将透视转换应用到 XAML 树(或场景),后者再根据该单一场景范围的转换(或相机)来转换所有 XAML 子元素。In Universal Windows apps, XAML has a new Transform3D API that lets you apply perspective transforms to a XAML tree (or scene), which transforms all XAML child elements according to that single scene-wide transform (or camera). 你之前可以通过 MatrixTransform 和复杂的数学运算执行此操作,但 Transform3D 极大地简化了此效果,并且还支持对此效果进行动画处理。You could do this previously using MatrixTransform and complex math, but Transform3D greatly simplifies this effect, and also enables the effect to be animated. 有关详细信息,请参阅 UIElement.Transform3D 属性、Transform3DCompositeTransform3DPerspectiveTransform3DFor more info, see the UIElement.Transform3D property, Transform3D, CompositeTransform3D, and PerspectiveTransform3D.


功能Feature 说明Description
HTTP 实时传送视频流HTTP Live Streaming 你可以使用新的 AdaptiveMediaSource 类将自适应视频流功能添加到你的应用。You can use the new AdaptiveMediaSource class to add adaptive video streaming capabilities to your apps. 通过将对象指向流清单文件可初始化该对象。The object is initialized by pointing it to a streaming manifest file. 支持的清单格式包括 Http 实时传送视频流 (HLS) 和 HTTP 动态自适应流式处理 (DASH)。Supported manifest formats include Http Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). 对象绑定到 XAML 媒体元素后,即开始自适应播放。Once the object is bound to a XAML media element, adaptive playback begins. 在适当的时候可以查询和设置流的属性,如可用的比特率、最小比特率和最大比特率。Properties of the stream, such as the available, minimum, and maximum bitrates, can be queried and set where appropriate.
对媒体基础转换 (MFTs) 的媒体基础转换代码视频处理器 (XVP) 支持Media Foundation Transcode Video Processor (XVP) support for Media Foundation Transforms (MFTs) 使用媒体基础转换 (MFT) 的 Windows 应用现在可以使用媒体基础转换代码视频处理器 (XVP) 来改变、缩放和转换原始视频数据:新 MF_XVP_CALLER_ALLOCATES_OUTPUT 属性支持输出到调用方分配的纹理,即使在 Microsoft DirectX 视频加速 (DXVA) 模式下也是如此。Windows apps that use Media Foundation Transforms (MFTs) can now use the Media Foundation Transcode Video Processor (XVP) to convert, scale, and transform raw video data: The new MF_XVP_CALLER_ALLOCATES_OUTPUT attribute enables the output to caller-allocated textures even in Microsoft DirectX Video Acceleration (DXVA) mode. IMFVideoProcessorControl2 接口允许你的应用启用硬件效果、查询支持的硬件效果以及替代由视频处理器执行的旋转操作。The new IMFVideoProcessorControl2 interface lets your app enable hardware effects, query for supported hardware effects, and override the rotation operation performed by the video processor.
转码Transcoding MediaProcessingTrigger API 让你的应用在后台任务中执行媒体转码,这样即使当前台应用已终止,也可以继续进行转码操作。The new MediaProcessingTrigger API lets your app perform media transcoding in a background task, so your transcoding operations can continue even when your foreground app has been terminated.
MediaElement 媒体故障事件MediaElement media failure events 在通用 Windows 应用中,MediaElement 将播放包含多个流的内容,即使其中一个流具有解码错误,只要媒体内容包含至少一个有效流即可。In Universal Windows apps, the MediaElement will play content containing multiple streams even if there’s an error decoding one of the streams, as long as the media content contains at least one valid stream. 例如包含了一个音频流和一个视频流的内容,如果其中的视频流无法播放,MediaElement 仍会播放音频流。For example, if the video stream in a content containing an audio and a video stream fails, the MediaElement will still play the audio stream. PartialMediaFailureDetected 会通知你流内的其中一个流无法解码。The PartialMediaFailureDetected notifies you that one of the streams within a stream could not be decoded. 它还会告知你哪些类型的流无法播放,以便你可以在 UI 中反映该信息。It also lets you know what type of stream failed so that you can reflect that info in your UI. 如果在媒体流内的所有流失败,将引发 MediaFailed 事件。If all of the streams within a media stream fail, the MediaFailed event is raised.
对使用 MediaElement 的自适应视频流的支持Support for adaptive video streaming with MediaElement MediaElement 具有新的 SetPlaybackSource 方法,可支持自适应视频流。MediaElement has the new SetPlaybackSource method to support adaptive video streaming. 若要将你的媒体源设置为 AdaptiveMediaSource,请使用此方法。Use this method to set your media source to an AdaptiveMediaSource.
通过 MediaElement 和图像转换Casting with MediaElement and Image MediaElement 和图像”控件具有新的 GetAsCastingSource 方法。The MediaElement and Image controls have the new GetAsCastingSource method. 你可以使用此方法以编程方式将内容从任何媒体或图像元素发送到更多类型的远程设备,如 Miracast、蓝牙和 DLNA。You can use this method to programmatically send content from any media or image element to a broader range of remote devices, like Miracast, Bluetooth, and DLNA. 将 MediaElement 的 AreTransportControlsEnabled 设置为 true 时,此功能将自动启用。 This functionality is enabled automatically when you set AreTransportControlsEnabled to true on a MediaElement.
适用于桌面应用的媒体传输控件Media transport controls for desktop apps ISystemMediaTransportControls 接口和相关的 API 允许桌面应用与内置的系统媒体传输控件交互。The ISystemMediaTransportControls interface and related APIs allow desktop apps to interact with the built-in system media transport controls. 其中包括:响应用户与传输控件按钮的交互,以及更新传输控件显示内容以显示有关当前正在播放的媒体内容的元数据。This includes responding to user interactions with the transport control buttons, and updating the transport controls display to show metadata about currently playing media content.
随机访问 JPEG 编码和解码Random-access JPEG encoding and decoding 新的 WIC 方法 IWICJpegFrameEncodeIWICJpegFrameDecode 支持 JPEG 图像的编码和解码。New WIC methods IWICJpegFrameEncode and IWICJpegFrameDecode enable the encoding and decoding of JPEG images. 你现在还可以启用为图像数据编制的索引,从而可以有效地随机访问大型图像,但代价是会产生较大的内存占用量。You can also now enable indexing of the image data, which provides efficient random access to large images at the expense of a larger memory footprint.
用于媒体合成的覆盖Overlays for media compositions MediaOverlayMediaOverlayLayer API 更便于向媒体组合添加静态或动态媒体内容的多个层。The new MediaOverlay and MediaOverlayLayer APIs make it easy to add multiple layers of static or dynamic media content to a media composition. 可以针对每个图层调整不透明度、位置和计时,并且甚至可以为输入层实现你自己的自定义合成器。Opacity, position, and timing can be adjusted for each layer, and you can even implement your own custom compositor for input layers.
新的特效框架New effects framework Windows.Media.Effects 命名空间提供了简单、直观的框架,以便将效果添加到音频和视频流。The Windows.Media.Effects namespace provides a simple and intuitive framework for adding effects to audio and video streams. 该框架包含你可以实现的基本接口,用于创建自定义音频和视频特效,并将它们插入媒体管道中。The framework includes basic interfaces that you can implement to create custom audio and video effects and insert them into the media pipeline.


功能Feature 说明Description
套接字Sockets 套接字更新包括:Socket updates include:

套接字代理: 套接字代理可以在应用生命周期的任何状态下,代表应用建立和关闭套接字连接。Socket broker: The socket broker can establish and close socket connections on behalf of an app in any state of the app lifecycle. 这使得应用及其提供的服务更容易被发现。This makes apps and the services that they provide more discoverable. 例如,通过套接字代理,Win32 服务即使不在运行中,也仍然可以接受传入的套接字连接。For example, by way of the socket broker, a Win32 service can still accept incoming socket connections even when it’s not running.

吞吐量改进: 套接字吞吐量已针对使用 Windows.Networking.Sockets 命名空间的应用进行了优化。Throughput improvements: Socket throughput has been optimized for apps that use the Windows.Networking.Sockets namespace.
后台传输后处理任务Background Transfer post-processing tasks 你可以利用 Windows.Networking.BackgroundTransfer 命名空间中的新 API 注册后处理任务组。New APIs in the Windows.Networking.BackgroundTransfer namespace let you register groups of post-processing tasks. 这样你的应用便可以立即根据后台传输的成功或失败执行操作,而不是等待下次用户恢复它,即使该应用不在前台运行也是如此。So your app can act on the success or failure of background transfers immediately, even if it’s not in the foreground, instead of waiting for the next time the user resumes the app.
对广告的蓝牙支持Bluetooth support for advertisements 借助 Windows.Devices.Bluetooth.Advertisement 命名空间,你的应用可以发送、接收并筛选蓝牙 LE 广告。With the Windows.Devices.Bluetooth.Advertisement namespace, your apps can send, receive, and filter Bluetooth LE advertisements.
WLAN Direct API 更新Wi-Fi Direct API update 设备代理已更新,目的是在不离开应用的情况下启用与设备配对。The device broker is updated to enable pairing with devices without leaving the app. 除此之外,Windows.Devices.WiFiDirect 命名空间还可以让某个设备能够检测到其他设备,并让该设备侦听传入的连接通知。Additions to the Windows.Devices.WiFiDirect namespace also let a device make itself discoverable to other devices, and let it listen for incoming connection notifications.

注意: 此版本中的 Wi-Fi Direct 功能改进并未内置于用户体验中,并且它们仅支持一键配对。Note: In this release, the Wi-Fi Direct feature improvements are not built into the UX, and they support only push-button pairing. 另外,此版本仅支持一个活动连接。Also, this release supports only one active connection.
JSON 支持改进JSON support improvements 在调试会话期间,转换 JSON 对象时,Windows.Data.Json 命名空间现在能更好地支持已有的标准定义和开发人员体验。The Windows.Data.Json namespace now better supports existing standard definitions and the developer experience when converting JSON objects during debug sessions.


功能Feature 说明Description
ECC 加密ECC encryption Windows.Security.Cryptography 命名空间中的新 API 提供对椭圆曲线加密法的支持,该加密法是一种基于有限字段上的椭圆曲线的公钥加密实现。New APIs in the Windows.Security.Cryptography namespace provide support for Elliptical Curve Cryptography (ECC), a public-key cryptography implementation based on elliptical curves over finite fields. ECC 在算术方面比 RSA 更为复杂,但提供了较小的密钥大小、降低了内存消耗,从而提升了性能。ECC is mathematically more complex than RSA, provides smaller key sizes, reduces memory consumption, and improves performance. 它为 Microsoft 服务和客户提供了 RSA 密钥和 NIST 批准曲线参数的替代方法。It offers Microsoft services and customers an alternative to RSA keys and NIST-approved curve parameters.
Microsoft PassportMicrosoft Passport Microsoft Passport 是身份验证的一种替代方法,使用非对称加密和手势来替换密码。Microsoft Passport is an alternative method of authentication that replaces passwords with asymmetric cryptography and a gesture. “凭据”命名空间中的类(如 KeyCredentialManger)让开发人员可以轻松通过 Microsoft Passport 来创建应用程序,而无需使用复杂的加密或生物识别。Classes in the Credentials namespace, such as KeyCredentialManger, make it easy for developers to create application using Microsoft Passport without the complexity of cryptography or biometrics.
Microsoft Passport for WorkMicrosoft Passport for Work Microsoft Passport for Work 是使用 Azure Active Directory 帐户登录 Windows 的替代方法,不需要使用密码、智能卡和虚拟智能卡。Microsoft Passport for Work is an alternative method for signing in Windows using your Azure Active Directory account that does not use passwords, smart card, and Virtual Smart Cards. 你可以选择是禁用还是启用此策略设置。You can choose whether to disable or enable this policy setting.
令牌代理Token Broker 令牌代理是一种新的身份验证框架,使应用更易于连接到联机标识提供者(如 Facebook)。Token Broker is a new authentication framework that makes it easier for apps to connect to online identity providers (like Facebook). 帐户用户名和密码管理等功能和简化的 UI 为用户极大改善了身份验证体验。Features such as account username and password management and a streamlined UI provide a greatly improved authentication experience for users.

系统服务System services

功能Feature 说明Description
强力Power 当启用或未启用节点模式时,你的 Windows 桌面应用程序现在都可以收到通知。Your Windows desktop application can now be notified when battery saver is engaged or disengaged. 通过响应电源条件更改,你的应用程序可以帮助延长电池使用时间。By responding to changing power conditions, your application has the opportunity to help extend battery life.

GUID_POWER_SAVING_STATUS:将此新的 GUID 与 PowerSettingRegisterNotification 函数结合使用,以便在节电模式处于启用或未启用状态时收到通知。GUID_POWER_SAVING_STATUS: Use this new GUID with the PowerSettingRegisterNotification function to be notified when battery saver is engaged or disengaged.

SYSTEM_POWER_STATUS:已将此结构更新为支持节电模式。SYSTEM_POWER_STATUS: This structure has been updated to support battery saver. 第四个成员 SystemStatusFlag(以前名为 Reserved1),现在用于指示节电模式是否已启用。The fourth member, SystemStatusFlag (previously named Reserved1, now indicates if battery saver is engaged or not. 使用 GetSystemPowerStatus 函数检索指向此结构的指针。Use the GetSystemPowerStatus function to retrieve a pointer to this structure.
版本Version 你可以使用 Version 帮助程序函数确定操作系统的版本。You can use the Version Helper functions to determine the version of the operating system. 在 Windows 10 中,这些帮助程序函数包括一个新函数 IsWindows10OrGreaterFor Windows 10, these helper functions include a new function, IsWindows10OrGreater. 如果你想要确定系统版本,则应该使用帮助程序函数,而不是使用已弃用的 GetVersionExGetVersion 函数。You should use the helper functions rather than the deprecated GetVersionEx and GetVersion functions when you want to determine the system version. 有关如何获取系统版本的详细信息,请参阅获取系统版本For more information about how to get the system version, see Getting the System Version.

如果你使用已弃用的 GetVersionExGetVersion 函数在 OSVERSIONINFOEXOSVERSIONINFO 结构中获取版本信息,请注意,这些结构包含的版本号将从适用于 Windows 8.1 和 Windows Server 2012 R2 的 6.3 版增加到适用于 Windows 10 的 10.0 版。If you do use the deprecated GetVersionEx or GetVersion function to get version information in an OSVERSIONINFOEX or OSVERSIONINFO structure, be aware that the version number that these structures contain increases from 6.3 for Windows 8.1 and Windows Server 2012 R2 to 10.0 for Windows 10. 有关操作系统版本号的详细信息,请参阅操作系统版本For more information about version numbers for the operating system, see Operating System Version.

你还需要在你的应用程序中明确定向到 Windows 8.1 或 Windows 10,以使用 GetVersionExGetVersion 函数获取有关这些版本的正确版本信息。You also need to specifically target Windows 8.1 or Windows 10 in your application to get the correct version information for these versions with the GetVersionEx or GetVersion function. 有关如何针对这些版本的 Windows 定向你的应用程序的信息,请参阅针对 Windows 定向你的应用程序For information about how to target your application for these versions of Windows, see Targeting your application for Windows.
用户信息User information Windows.System 命名空间中的新 API 使你可以轻松访问用户相关信息,例如其用户名和头像。New APIs in the Windows.System namespace make it easy to access information about a user, like their username and account picture. 它还提供了响应用户事件(如登录和注销)的功能。It also provides the ability to respond to user events such as log-in and log-out.
内存管理和分析Memory management and profiling Windows.System 中内存分析 API 的支持已扩展至所有平台,并且其整体功能已通过新的类和函数进行增强。Support for memory profiling API in Windows.System has been extended to all platforms, and their overall functionality has been enhanced with new classes and functions.


功能Feature 说明Description
适用于 Windows Phone 的文件搜索 APIFile-search APIs available for Windows Phone 作为应用发布者,你可以通过向应用清单添加扩展来注册应用以便与你发布的其他应用共享存储文件夹。As an app publisher, you can register your app to share a storage folder with other apps that you publish by adding extensions to the app manifest. 然后,调用 Windows.Storage.ApplicationData.GetPublisherCacheFolder 方法来获取共享的存储位置。Then call the Windows.Storage.ApplicationData.GetPublisherCacheFolder method to get the shared storage location. Windows 运行时应用强大的安全模型通常会防止应用在自身之间共享数据。The strong security model of Windows Runtime apps typically prevents apps from sharing data among themselves. 但是,它可以帮助来自同一发布者的应用共享基于每个用户的文件和设置。But it can be useful for apps from the same publisher to share files and settings on a per-user basis.


功能Feature 说明Description
Visual Studio 中的动态可视化树Live Visual Tree in Visual Studio Visual Studio 具有新的动态可视化树功能。Visual Studio has a new Live Visual Tree feature. 你可以在调试时使用该功能来快速了解应用的可视化树状态,并了解元素属性的设置方式。You can use it while debugging to quickly understand the state of your app’s visual tree, and discover how element properties were set. 该功能还允许你在应用运行时更改属性值,这样你无需重新启动即可进行调整和实验。It also lets you change property values while your app is running, so you can tweak and experiment without having to re-launch.
跟踪日志记录Trace logging 跟踪日志记录是适用于用户模式应用和内核模式驱动程序的全新事件跟踪 API;它基于 Windows 事件跟踪 (ETW) 生成。TraceLogging is a new event-tracing API for user-mode apps and kernel-mode drivers; it builds on Event Tracing for Windows (ETW). 此 API 提供了一种简化方式来检测代码和在结构数据中包括事件,而无需要求单独的检测清单 XML 文件。This API provides a simplified way to instrument code and include structured data with events without requiring a separate instrumentation manifest XML file. WinRT、.NET 和 C/C++ TraceLogging API 都可服务于不同的开发人员受众。WinRT, .NET, and C/C++ TraceLogging APIs are available to serve different developer audiences.

用户体验User Experience

功能Feature 说明Description
语音识别Speech recognition 通用 Windows 平台现在支持针对长篇听写方案的连续语音识别。Continuous speech recognition for long-form dictation scenarios is now supported by the Universal Windows Platform. 了解如何在语音交互文档中启用连续听写。See how to enable continuous dictation in the Speech interaction docs.
不同应用程序平台之间的拖放功能Drag-and-drop capabilities between different application platforms Windows.ApplicationModel.DataTransfer.DragDrop 命名空间为通用 Windows 应用提供拖放功能。The new Windows.ApplicationModel.DataTransfer.DragDrop namespaces bring drag-and-drop functionality to Universal Windows apps. 以前,桌面程序中的常见拖放方案(例如将文档从文件夹拖动到需要附加它的 Outlook 电子邮件中)不适用于通用 Windows 应用。Previously, common drag-and-drop scenarios for desktop programs—such as dragging a document from a folder into an Outlook email message to attach it—are not possible with Universal Windows apps. 使用这些新的 API,你的应用可以让用户轻松地在不同的通用 Windows 应用和桌面之间移动数据。Using these new APIs, your app can let users easily move data between different Universal Windows apps and the desktop.

为了支持应用之间的拖放,这些新的 API 已添加到XAML:ListViewBase.DragItemsCompletedTo support Drag and Drop between apps, these new APIs have been added to XAML: ListViewBase.DragItemsCompleted;
UIElement:CanDragDragStartingStartDragAsyncDropCompletedUIElement: CanDrag, DragStarting, StartDragAsync, DropCompleted;
DragOperationDeferralDragUIDragUIOverrideDragOperationDeferral, DragUI, DragUIOverride;
DragEventArgs:AcceptedOperationDataViewDragUIOverrideGetDeferralModifiersDragEventArgs: AcceptedOperation, DataView, DragUIOverride, GetDeferral, Modifiers;
DragItemsCompletedEventArgsDropCompletedEventArgsDragStartingEventArgsDragItemsCompletedEventArgs, DropCompletedEventArgs, DragStartingEventArgs
自定义窗口标题栏Custom window title bars 对于适用于桌面设备系列的 UWP 应用,现在可以将 ApplicationViewTitleBar 类与 ApplicationView.TitleBar 属性和 Window.SetTitleBar 方法结合使用,以便将默认 Windows 标题栏内容替换为你自己的自定义 XAML 内容。For UWP apps for the desktop device family, you can now use the ApplicationViewTitleBar class with the ApplicationView.TitleBar property and Window.SetTitleBar method to replace the default Windows title bar content with your own custom XAML content. 你的 XAML 将被视为“系统镶边”,因此 Windows(而不是你的应用)将处理输入事件。Your XAML is treated as "system chrome", so Windows will handle the input events instead of your app. 这意味着用户甚至可以在单击你的自定义标题栏内容时拖动窗口和调整窗口的大小。This means the user can still drag and resize the window, even when clicking on your custom title bar content.


功能Feature 说明Description
Microsoft EdgeMicrosoft Edge Microsoft Edge 是为 Windows 10 生成的全新默认浏览器。Microsoft Edge is the new default browser built for Windows 10. 有关 Microsoft Edge 中包括的开发人员功能和标准的详细信息和概述(包括最新的 JavaScript 功能),请参阅 Microsoft Edge 开发人员指南For more information and an overview of the developer features and standards included in Microsoft Edge, including the latest JavaScript features, see The Microsoft Edge Developer Guide.
WebView 浏览WebView browsing WebView 控件与新的 Microsoft Edge 浏览器使用相同的呈现引擎。The WebView control uses the same rendering engine as the new Microsoft Edge browser. 这将提供最准确、最符合标准的 HTML 呈现模式。This provides the most accurate, standards-compliant mode of HTML rendering.
线程外 WebViewOff-thread WebView 若要允许处理和显示单独后台线程上的 Web 内容,可以指定 WebView.ExecutionModeYou can specify a WebView.ExecutionMode to enable processing and display of web content on a separate background thread. 在某些特定情况下,这可以提高性能。This can improve performance in certain, specific scenarios.
WebView.UnsupportedUriSchemeIdentified 事件WebView.UnsupportedUriSchemeIdentified event WebView.UnsupportedUriSchemeIdentified 事件可用于确定你的应用处理不受支持的 URI 方案的方式。The new WebView.UnsupportedUriSchemeIdentified event lets you decide how your app should an unsupported URI scheme. 你可以处理此事件以使你的应用能够针对不受支持的 URI 方案提供自定义处理。You can handle this event to let your app provide custom handling of unsupported URI schemes. 有关 HTML WebView 控件,请参阅 MSWebViewUnsupportedUriSchemeIdentified 事件。For the HTML WebView control, see the MSWebViewUnsupportedUriSchemeIdentified event.
WebView.NewWindowRequested 事件WebView.NewWindowRequested event WebView.NewWindowRequested 事件使你可以在 WebView 中的脚本请求新浏览器窗口时做出响应。The new WebView.NewWindowRequested event lets you respond when a script in a WebView requests a new browser window. 有关 HTML WebView 控件,请参阅 MSWebViewNewWindowRequested 事件。For the HTML WebView control, see the MSWebViewNewWindowRequested event.
WebView.PermissionRequested 事件WebView.PermissionRequested event WebView.PermissionRequested 事件允许 WebView 内容使用丰富的全新 HTML5 API,它们需要获得特殊的用户权限,如地理位置。The new WebView.PermissionRequested event lets WebView content leverage rich new HTML5 APIs that require special permission from the user, like geolocation. 有关 HTML WebView 控件,请参阅 MSWebViewPermissionRequested 事件。For the HTML WebView control, see the MSWebViewPermissionRequested event.
WebView.UnviewableContentIdentified 事件WebView.UnviewableContentIdentified event WebView.UnviewableContentIdentified 事件使你可以在 WebView 导航到 PDF 文件或 Office 文档等非 Web 内容时做出响应。The new WebView.UnviewableContentIdentified event lets you respond when the WebView is navigated to non-web content such as a PDF file or Office document. 有关 HTML WebView 控件,请参阅 MSWebViewUnviewableContentIdentified 事件。For the HTML WebView controls, see the MSWebViewUnviewableContentIdentified event.
WebView.AddWebAllowedObject 方法WebView.AddWebAllowedObject method 你可以通过调用新 WebView.AddWebAllowedObject 方法,将 WinRT 对象注入 XAML WebView 中,然后通过托管在该 WebView 中的可信 JavaScript 来调用其函数。You can call the new WebView.AddWebAllowedObject method to inject a WinRT object into a XAML WebView, and then call its functions from trusted JavaScript hosted in that WebView. 例如,Web 内容可以通过请求其父应用调用 ToastNotificationManager WinRT API,显示系统通知。For example, web content can show system notifications by requesting that its parent app call the ToastNotificationManager WinRT API. 有关 HTML WebView 控件,请参阅 addWebAllowedObject 方法。For the HTML WebView control, see the addWebAllowedObject method.
WebView.ClearTemporaryWebDataAsync 方法WebView.ClearTemporaryWebDataAsync method 当用户与 XAML WebView 中的 Web 内容交互时,WebView 控件将根据该用户的会话缓存数据。When a user interacts with web content inside a XAML WebView, the WebView control caches data based on that user's session. 若要清除此缓存,可以调用新的 ClearTemporaryWebDataAsync 方法。You can call the new ClearTemporaryWebDataAsync method to clear this cache. 例如,你可以在一位用户退出应用后清除缓存,这样其他用户就无法访问前一会话的任何数据。For example, you can clear the cache when one user logs out of the app so another user can’t access any data from the previous session.