From: Jaehyun Cho Date: Wed, 27 Dec 2023 04:15:30 +0000 (+0900) Subject: [NUI] Fix Navigator to support Page with Transitions X-Git-Tag: accepted/tizen/unified/20231228.165720~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9234bba03d234f4d6d1c63798a27259a7143b072;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix Navigator to support Page with Transitions Previously, PushWithTransition and PopWithTransition did not support Page. It supported either ContentPage or DialogPage. Now, PushWithTransition and PopWithTransition supports Page as well. --- diff --git a/src/Tizen.NUI.Components/Controls/Navigation/Navigator.cs b/src/Tizen.NUI.Components/Controls/Navigation/Navigator.cs index 83ca5cc..9d5dd83 100755 --- a/src/Tizen.NUI.Components/Controls/Navigation/Navigator.cs +++ b/src/Tizen.NUI.Components/Controls/Navigation/Navigator.cs @@ -998,7 +998,16 @@ namespace Tizen.NUI.Components if (!pushTransition || newTopPage is DialogPage == false) { - View transitionView = (currentTopPage is ContentPage) ? (currentTopPage as ContentPage).Content : (currentTopPage as DialogPage).Content; + View transitionView = currentTopPage; + if (currentTopPage is ContentPage) + { + transitionView = (currentTopPage as ContentPage).Content; + } + else if (currentTopPage is DialogPage) + { + transitionView = (currentTopPage as DialogPage).Content; + } + if (currentTopPage.DisappearingTransition != null && transitionView != null) { TransitionItemBase disappearingTransition = currentTopPage.DisappearingTransition.CreateTransition(transitionView, false); @@ -1012,7 +1021,16 @@ namespace Tizen.NUI.Components } if (pushTransition || currentTopPage is DialogPage == false) { - View transitionView = (newTopPage is ContentPage) ? (newTopPage as ContentPage).Content : (newTopPage as DialogPage).Content; + View transitionView = newTopPage; + if (newTopPage is ContentPage) + { + transitionView = (newTopPage as ContentPage).Content; + } + else if (newTopPage is DialogPage) + { + transitionView = (newTopPage as DialogPage).Content; + } + if (newTopPage.AppearingTransition != null && transitionView != null) { TransitionItemBase appearingTransition = newTopPage.AppearingTransition.CreateTransition(transitionView, true);