-
-
Notifications
You must be signed in to change notification settings - Fork 948
If implementing INavigationAware in a Page, the methods are being called twice, redundantly. #636
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
If implementing INavigationAware in a Page, the methods are being called twice, redundantly,
To reproduce this issue, I have inherited INavigationAware in the AllControlsPage under the Wpf.Ui.Gallery folder. Then, I have output some information in the OnNavigatedTo method, and this information is being output twice
To Reproduce
public partial class AllControlsPage : INavigableView , INavigationAware
{
public AllControlsViewModel ViewModel { get; }
public AllControlsPage(AllControlsViewModel viewModel)
{
ViewModel = viewModel;
DataContext = this;
InitializeComponent();
}
public void OnNavigatedTo()
{
Debug.WriteLine("==== NavigatedTo");
}
public void OnNavigatedFrom()
{
}
}
we can show debug output :
==== NavigatedTo
==== NavigatedTo****
Expected behavior
There is an error with INavigationAware on the page class
Screenshots
No response
OS version
window
.NET version
net7.0
WPF-UI NuGet version
github source code now
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working