wpfui
wpfui copied to clipboard
The NavigationView control cannot be used
Describe the bug
/ Ideally, I would add NavigationView that can be used immediately through simple configuration, but after extensive experimentation and sample review, it still cannot solve this problem effectively. NavigationView is currently designed based on mvvlight and even has deep binding with MvvLight. I saw the simple.demo you provided, which requires navigate (type) in the MainWindow Load event first. I don't know the reason why they all do this. There is an IsActive dependency property in the NavigationItem control, which has a mandatory dependency relationship with the TargetPageType property. If TargetPageType=null, it is even impossible to determine the IsActive value of the NavigationItem, which is reflected in whether the NavigationItem is selected on the UI. NavigationItem cannot determine IsActive, IsSelected, and other states using the click event, and the user experience is truly indescribable. I just want to use it in a traditional way, but everything needs to be used in conjunction with mvvlight to function properly, and I can't even use Prism. Is it because I crave too much?
To Reproduce
Create a new project, introduce necessary xamls, directly add the NavigationView control, set the content attribute, and nothing will be displayed on the interface
Expected behavior
It should be possible to briefly display the navigation UI, similar to this:
In an ideal situation, WPFUI should focus on the UI and not be too deeply coupled with various frameworks. Isn't this possible to reduce maintenance costs more? Let users decide on their own development approach, whether to use traditional code handle event driven, common-tools-mvvmlight, or Prism, and there should not be too much coupling,
Screenshots
MainWindow xaml:
MainWindow c#:
Running results:
OS version
win11 22H2
.NET version
.net7
WPF-UI NuGet version
all version,2.1-3.0.0-preview.6
Additional context
Similar UI ->ui.wpf.modern
https://github.com/InkoreStudios/UI.WPF.Modern
.csproj file
MainWindow xaml:
Running results:
The only regret is that ui.wpf.modern uses Winrt, which consumes a high amount of system resources and may have compatibility issues. Additionally, no one will continue to maintain Winrt in the later stages, which is a sad thing. Apart from waiting indefinitely for Microsoft to provide the Win11 style theme, we cannot find any ideal wpf skins to use
To be honest, i have no idea how you even USE </ui:NavigationView.MenuItems> In my V2.1 it doesn't even exist, not even in older version down to 1.3.
Has it been solved yet? I'm having a similar problem, I'm trying to use prism's region navigation, however can't pass in regionmanager.
I have a MenuItems. I'm trying to migration from https://github.com/Kinnara/ModernWpf, but also having issues with getting Prism integrated. I don't mind changing away from it, though.
What's using WinRT? I think it was removed, I don't think I'm seeing references to it.