Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,6 @@ private static void SwapViews(FrameworkElement oldView, FrameworkElement newView
// need to swap the content of the page instead. This can happen if the Frame
// is using a native presenter which does not use the `Frame.Content` property.

// Clear any local context, so that the new page can inherit the value coming
// from the parent Frame. It may happen if the old page set it explicitly.

#if !WINUI
oldPage.ClearValue(Page.DataContextProperty, DependencyPropertyValuePrecedences.Local);
#else
oldPage.ClearValue(Page.DataContextProperty);
#endif

oldPage.Content = newPage;
#if !WINUI
newPage.Frame = oldPage.Frame;
Expand Down
Loading