We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0487aef commit 1ec083aCopy full SHA for 1ec083a
src/Controls/src/Core/MultiPage.cs
@@ -85,7 +85,17 @@ public T CurrentPage
85
OnPropertyChanging();
86
87
// TODO: MAUI refine this to fire earlier
88
- _current?.SendNavigatingFrom(new NavigatingFromEventArgs(value, NavigationType.Replace));
+
89
+ // Send NavigatingFrom to the previous page or to the new page if no previous page exists
90
+ if (_current is not null)
91
+ {
92
+ _current.SendNavigatingFrom(new NavigatingFromEventArgs(value, NavigationType.Replace));
93
+ }
94
+ else
95
96
+ // For initial page, send NavigatingFrom to itself
97
+ value?.SendNavigatingFrom(new NavigatingFromEventArgs(value, NavigationType.Replace));
98
99
100
_current = value;
101
0 commit comments