简体   繁体   中英

UWP NavigationView is not supported

I am trying to make UWP application with sidemenu. When I try this tutorial, I get an error in XAML:

NavigationView is not supported in a windows universal project

Build options:

Target Version:   Win 10 Creators Update (10.0; Build 15063)
Minimum Version:  November Update (10.0' Build 10586)

Requirements to use NavigationView Class:

Device family: Windows 10 Fall Creators Update (introduced v10.0.16299.0 )

API contract: Windows.Foundation.UniversalApiContract (introduced v5 )

Reference: NavigationView Class

NavigationView has also been backported to support all versions of Windows 10 starting with 14393 (Anniversary Update).

You can add it via NuGet and file issues here: https://github.com/Microsoft/microsoft-ui-xaml

You'll have to change the target version to Win 10 Fall Creators Update (10.0; Build 16299) . Also the NavigationView control will not work on any previous version of Windows so your app will crash everywhere except 16299 and above if you use the NavigationView control without any API version checks.

And to upgrade your PC to FCU you can use the tool provided here .

You can use OneCode.Windows.UWP.Controls.NavigationView, it works on all Win10 Versions. You can get it from nuget https://www.nuget.org/packages/OneCode.Windows.UWP.Controls.NavigationView/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM