Windows UI 程式庫 2.2

WinUI 2.2 是 Windows UI 程式庫 2019 年 8 月的發行版本。

您可以使用 NuGet 套件管理員,在應用程式中新增 WinUI 套件:如需詳細資訊,請參閱開始使用 Windows UI 程式庫

Windows UI 程式庫 (WinUI) 裝載於 GitHub,我們建議您在此提交 Bug 報告、功能要求和社群代碼貢獻。

Microsoft.UI.Xaml 2.2 版本歷程記錄

Windows UI 程式庫 2.2 官方版本

2019 年 8 月

GitHub 版本頁面

NuGet 套件下載

新功能

TabView

Short video showing the behavior of the Tab View control.

描述

TabView 控制項是索引標籤的集合,每個索引標籤各自代表應用程式中的一個新頁面或文件。 當應用程式有數頁內容,而且使用者希望能夠新增、關閉和重新排列索引標籤時,TabView 就很有用。 新的 Windows 終端機會使用 TabView 來顯示多個命令列介面。

文件

/uwp/api/microsoft.ui.xaml.controls.tabview?view=winui-2.2&preserve-view=true

a) NavigationView 的 [上一頁] 按鈕更新

Short video showing the updated behavior of the Navigation View control Back Button.

描述

在 NavigationView 的最小模式中,[上一頁] 按鈕不會再消失。 使用者在開啟和關閉窗格時,不再需要移動其游標來按一下漢堡按鈕。 這項功能預設為運作狀態。 您不需要變更任何程式碼即可讓此功能運作。

b) NavigationView - 無自動填補

Screenshot showing the behavior of the Navigation View control with No Auto Padding.

描述

應用程式開發人員現在可以在使用 NavigationView 控制項時回收其應用程式視窗內的所有像素,並將其延伸到標題列區域。

文件

/windows/uwp/design/controls-and-patterns/navigationview#top-whitespace

視覺化樣式更新

a) 圓角半徑更新

Screenshot showing the updated style of the Corner Radius.

描述

已新增 CornerRadius 屬性。 預設控制項已更新為使用微圓角。 開發人員可以輕鬆地自訂圓角半徑,在需要時讓應用程式具有獨特的外觀。

https://github.com/microsoft/microsoft-ui-xaml/issues/524

b) 框線粗細更新

Screenshot showing the updated style of the Borer Thickness.

描述

BorderThickness 屬性變得更容易自訂。 預設控制項已更新,可讓外框變得更細以獲得簡潔熟悉的外觀。

https://github.com/microsoft/microsoft-ui-xaml/issues/835

c) 按鈕視覺效果更新

Screenshot showing the updated style of the Button control.

描述:

預設按鈕的視覺效果已更新,移除了會在滑鼠停留時出現的外框,以使預設按鈕的外觀更為簡潔。

https://github.com/microsoft/microsoft-ui-xaml/issues/953

d) SplitButton 視覺效果更新

Screenshot showing the updated style of the Split Button control.

描述:

預設 SplitButton 的視覺效果已更新,使其更有別於 DropDownButton。

https://github.com/microsoft/microsoft-ui-xaml/issues/986

e) ToggleSwitch 視覺效果更新

Screenshot showing the updated style of the Toggle Switch control.

描述:

預設 ToggleSwitch 的寬度已從 44 px 縮減為 40 px,以使其外觀更為平衡,同時保有可用性。

https://github.com/microsoft/microsoft-ui-xaml/issues/836

f) 核取方塊和選項按鈕視覺效果更新

Screenshot showing the updated style of the Check Box and Radio Button controls

描述:

核取方塊和選項按鈕視覺效果已更新,以便與其餘的視覺化樣式變更保持一致。

https://github.com/microsoft/microsoft-ui-xaml/issues/839

範例

提示

如需詳細資訊、設計指引和程式碼範例,請參閱設計和程式碼 Windows 應用程式

WinUI 3 資源庫WinUI 2 資源庫應用程式包含大部分 WinUI 3 和 WinUI 2 控制項、特性和功能的互動式範例。

如果已安裝,請按一下下列連結加以開啟:WinUI 3 資源庫WinUI 2 資源庫

如果未安裝,您可以從 Microsoft Store 下載 WinUI 3 資源庫WinUI 2 資源庫

您也可以從 GitHub 取得這兩者的原始程式碼 (使用 WinUI 3 的主要 分支和 WinUI 2 的 winui2 分支)。

文件

Windows UI 程式庫控制項的操作說明文章隨附於通用 Windows 平台控制項文件

API 參考文件位於這裡: Windows UI 程式庫 API

Microsoft.UI.Xaml 2.2-prerelease 版本歷程記錄

Microsoft.UI.Xaml 2.2.190702001-prerelease

2019 年 7 月

GitHub 版本頁面

NuGet 套件下載

實驗性功能

Microsoft.UI.Xaml 2.2.20190416001-prerelease

2019 年 4 月

GitHub 版本頁面

NuGet 套件下載

實驗性功能