Open johnnyelwailer opened 1 year ago
@nickrandolph this appears to be a bug in Extensions.Navigation
Exception: System.NullReferenceException
Message: Logger needs to be set
Source: Uno.Extensions.Navigation.UI
StackTrace:
at Uno.Extensions.Navigation.UI.Region.get_Logger()
at Uno.Extensions.Navigation.UI.Region.AttachedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at ABI.Microsoft.UI.Xaml.PropertyChangedCallback.Do_Abi_Invoke(IntPtr thisPtr, IntPtr d, IntPtr e)
--- End of stack trace from previous location ---
at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
at ABI.Microsoft.UI.Xaml.IDependencyObjectMethods.SetValue(IObjectReference _obj, DependencyProperty dp, Object value)
at Microsoft.UI.Xaml.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Uno.Extensions.Navigation.UI.RegionPropertyBuilder.Attached(Boolean attached)
at UnoApp3.Presentation.Shell.<>c.<.ctor>b__0_0(RegionPropertyBuilder r) in Y:\temp\UnoApp3\UnoApp3\UnoApp3\Presentation\Shell.cs:line 11
Any workaround?
4.1.0-dev.74
still have a bug
So I figured out what is wrong @johnnyelwailer see explanation in https://github.com/unoplatform/uno.extensions/issues/215
Good day I am using C# markup and trying to implement a basic NavigationView.
Current behavior
I got a basic NavigationView displayed, but clicking on an item would not lanch a navigation.
I then went over the docs (for which there is unfortunately no Version for C# Markup): https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Tutorials/Navigation/Advanced/HowTo-UseNavigationView.html
It says something like add the
uen:Region.Attached
everywhere, I don't understand why, but I assumed it is important. So I found the equivalent in C#:.Region(r => r.Attached(true))
Since I added that to any of the elements in the Shell, I am receiving a Null Reference Exception:
Logger needs to be set
Expected behavior
There should be no error, and navigation should work
How to reproduce it (as minimally and precisely as possible)
Create an app from the template activating the routing using regions, and csharp markup.
Environment
Winui, .Net 8
Package Version(s): UNO.WinUi 5.0.41
Affected platform(s):
Visual Studio:
Relevant plugins:
Anything else we need to know?
I saw there was already a bufix related to this exception here: https://github.com/unoplatform/uno.extensions/issues/1732 Unfortunately, it doesn't seem to apply for me