Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation parameter is missing from NavigationFailedEventArgs #9213

Open
sjb-sjb opened this issue Jan 7, 2024 · 1 comment
Open

Navigation parameter is missing from NavigationFailedEventArgs #9213

sjb-sjb opened this issue Jan 7, 2024 · 1 comment
Labels
area-Navigation Frame, Page feature proposal New feature proposal team-Controls Issue for the Controls team

Comments

@sjb-sjb
Copy link

sjb-sjb commented Jan 7, 2024

Describe the bug

In the Frame.NavigationFailed event, the NavigationFailedEventArgs does not contain a Parameter property that provides the navigation parameter.

This is inconsistent with the other navigation events and makes it impossible to manage the navigation parameter consistently with the other navigation events. For example, if the navigation parameter may refer (directly or indirectly) to an object that needs to be informed of the navigation failure event.

Steps to reproduce the bug

Subscribe to the event and try to examine the Parameter property of NavigationFailedEventArgs.

Expected behavior

Should have the parameter there.

Screenshots

No response

NuGet package version

None

Windows version

No response

Additional context

No response

@sjb-sjb sjb-sjb added the bug Something isn't working label Jan 7, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jan 7, 2024
@DarranRowe
Copy link

DarranRowe commented Jan 8, 2024

One issue with calling this a bug is that Microsoft.UI.Xaml.Navigation.NavigationFailedEventArgs matches Windows.UI.Xaml.Navigation.NavigationFailedEventArgs.
Another thing here is that windows.ui.xaml.navigation.idl in the Windows SDK only has a single interface for this runtime class. The rules of COM, which are also the rules of WinRT components, means that once an interface is defined, it can't be redefined. Especially not without changing the UUID.
The WinRT components have also been very careful about extending functionality using numbered interfaces. An example of this is the Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs. This has a INavigatingCancelEventArgs interface, and an INavigatingCancelEventArgs2 interface. As a side note, when NavigatingCancelEventArgs was ported to WinUI 3, these interfaces were combined into one.
Anyway, the lack of Parameter from the NavigationFailedEventArgs was apparently part of the original UWP/WinUI design. So I feel as if this would be better as a feature request.

@bpulliam bpulliam added feature proposal New feature proposal area-Navigation Frame, Page team-Controls Issue for the Controls team and removed bug Something isn't working needs-triage Issue needs to be triaged by the area owners labels Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Navigation Frame, Page feature proposal New feature proposal team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

3 participants