How do I set Frame.Navigate to happen immediately with no transition?
I am working on a Windows Phone 8.1 app as part of a Windows Universal App. Following the tutorial on extending splash screens in Windows Universal Apps I changed my App.xaml.cs to replace
if (!rootFrame.Navigate(typeof(SplashPage), e.Arguments))
throw new Exception("Failed to create splash page");
with
if (e.PreviousExecutionState != ApplicationExecutionState.Running)
var extendedSplash = new SplashPage(e.SplashScreen);
Window.Current.Content = extendedSplash;
However this meant that I lost access to the root frame when I overwrote Window.Current.Content
. I would like to instead use
SplashPage.SplashScreen = e.SplashScreen;
if (!rootFrame.Navigate(typeof(SplashPage), e.Arguments))
throw new Exception("Failed to create splash page");
But now the page transitions in. There is an override for Frame.Navigate
which takes an additional NavigationTransitionInfo
parameter, typically set to one of its subclasses:
CommonNavigationTransitionInfo (i.e. roll in from the right);
SlideNavigationTransitionInfo (i.e. slides up); or
ContinuumNavigationTransitionInfo (i.e. a short zoom-in).
(N.B. James Croft has a good blog post showing these transitions.)
But for a splash screen extension I need the page to show immediately, without a transition (just as one gets by overwriting Window.Current.Content
with the new page instance).
How do I set Frame.Navigate
to happen immediately with no transition?
windows-runtime windows-phone-8.1 win-universal-app
add a comment |
I am working on a Windows Phone 8.1 app as part of a Windows Universal App. Following the tutorial on extending splash screens in Windows Universal Apps I changed my App.xaml.cs to replace
if (!rootFrame.Navigate(typeof(SplashPage), e.Arguments))
throw new Exception("Failed to create splash page");
with
if (e.PreviousExecutionState != ApplicationExecutionState.Running)
var extendedSplash = new SplashPage(e.SplashScreen);
Window.Current.Content = extendedSplash;
However this meant that I lost access to the root frame when I overwrote Window.Current.Content
. I would like to instead use
SplashPage.SplashScreen = e.SplashScreen;
if (!rootFrame.Navigate(typeof(SplashPage), e.Arguments))
throw new Exception("Failed to create splash page");
But now the page transitions in. There is an override for Frame.Navigate
which takes an additional NavigationTransitionInfo
parameter, typically set to one of its subclasses:
CommonNavigationTransitionInfo (i.e. roll in from the right);
SlideNavigationTransitionInfo (i.e. slides up); or
ContinuumNavigationTransitionInfo (i.e. a short zoom-in).
(N.B. James Croft has a good blog post showing these transitions.)
But for a splash screen extension I need the page to show immediately, without a transition (just as one gets by overwriting Window.Current.Content
with the new page instance).
How do I set Frame.Navigate
to happen immediately with no transition?
windows-runtime windows-phone-8.1 win-universal-app
I think it should work, fi you disable default transitions for a frame - in app.xaml.cs file, where the rootFrame is created, just after creation, addrootFrame.ContentTransitions = null;
.
– Romasz
Apr 10 '15 at 10:31
Brilliant. That was already in App.xaml.cs but it lead me on to the Frame.Navigated event where I could change the handler to only add back the transitions ifNavigationEventArgs.SourcePageType != typeof(SplashPage)
– dumbledad
Apr 10 '15 at 10:40
You may also think of disabling frame's transition and define them for every page in xaml if needed.
– Romasz
Apr 10 '15 at 10:48
add a comment |
I am working on a Windows Phone 8.1 app as part of a Windows Universal App. Following the tutorial on extending splash screens in Windows Universal Apps I changed my App.xaml.cs to replace
if (!rootFrame.Navigate(typeof(SplashPage), e.Arguments))
throw new Exception("Failed to create splash page");
with
if (e.PreviousExecutionState != ApplicationExecutionState.Running)
var extendedSplash = new SplashPage(e.SplashScreen);
Window.Current.Content = extendedSplash;
However this meant that I lost access to the root frame when I overwrote Window.Current.Content
. I would like to instead use
SplashPage.SplashScreen = e.SplashScreen;
if (!rootFrame.Navigate(typeof(SplashPage), e.Arguments))
throw new Exception("Failed to create splash page");
But now the page transitions in. There is an override for Frame.Navigate
which takes an additional NavigationTransitionInfo
parameter, typically set to one of its subclasses:
CommonNavigationTransitionInfo (i.e. roll in from the right);
SlideNavigationTransitionInfo (i.e. slides up); or
ContinuumNavigationTransitionInfo (i.e. a short zoom-in).
(N.B. James Croft has a good blog post showing these transitions.)
But for a splash screen extension I need the page to show immediately, without a transition (just as one gets by overwriting Window.Current.Content
with the new page instance).
How do I set Frame.Navigate
to happen immediately with no transition?
windows-runtime windows-phone-8.1 win-universal-app
I am working on a Windows Phone 8.1 app as part of a Windows Universal App. Following the tutorial on extending splash screens in Windows Universal Apps I changed my App.xaml.cs to replace
if (!rootFrame.Navigate(typeof(SplashPage), e.Arguments))
throw new Exception("Failed to create splash page");
with
if (e.PreviousExecutionState != ApplicationExecutionState.Running)
var extendedSplash = new SplashPage(e.SplashScreen);
Window.Current.Content = extendedSplash;
However this meant that I lost access to the root frame when I overwrote Window.Current.Content
. I would like to instead use
SplashPage.SplashScreen = e.SplashScreen;
if (!rootFrame.Navigate(typeof(SplashPage), e.Arguments))
throw new Exception("Failed to create splash page");
But now the page transitions in. There is an override for Frame.Navigate
which takes an additional NavigationTransitionInfo
parameter, typically set to one of its subclasses:
CommonNavigationTransitionInfo (i.e. roll in from the right);
SlideNavigationTransitionInfo (i.e. slides up); or
ContinuumNavigationTransitionInfo (i.e. a short zoom-in).
(N.B. James Croft has a good blog post showing these transitions.)
But for a splash screen extension I need the page to show immediately, without a transition (just as one gets by overwriting Window.Current.Content
with the new page instance).
How do I set Frame.Navigate
to happen immediately with no transition?
windows-runtime windows-phone-8.1 win-universal-app
windows-runtime windows-phone-8.1 win-universal-app
asked Apr 10 '15 at 10:26
dumbledaddumbledad
5,8051465175
5,8051465175
I think it should work, fi you disable default transitions for a frame - in app.xaml.cs file, where the rootFrame is created, just after creation, addrootFrame.ContentTransitions = null;
.
– Romasz
Apr 10 '15 at 10:31
Brilliant. That was already in App.xaml.cs but it lead me on to the Frame.Navigated event where I could change the handler to only add back the transitions ifNavigationEventArgs.SourcePageType != typeof(SplashPage)
– dumbledad
Apr 10 '15 at 10:40
You may also think of disabling frame's transition and define them for every page in xaml if needed.
– Romasz
Apr 10 '15 at 10:48
add a comment |
I think it should work, fi you disable default transitions for a frame - in app.xaml.cs file, where the rootFrame is created, just after creation, addrootFrame.ContentTransitions = null;
.
– Romasz
Apr 10 '15 at 10:31
Brilliant. That was already in App.xaml.cs but it lead me on to the Frame.Navigated event where I could change the handler to only add back the transitions ifNavigationEventArgs.SourcePageType != typeof(SplashPage)
– dumbledad
Apr 10 '15 at 10:40
You may also think of disabling frame's transition and define them for every page in xaml if needed.
– Romasz
Apr 10 '15 at 10:48
I think it should work, fi you disable default transitions for a frame - in app.xaml.cs file, where the rootFrame is created, just after creation, add
rootFrame.ContentTransitions = null;
.– Romasz
Apr 10 '15 at 10:31
I think it should work, fi you disable default transitions for a frame - in app.xaml.cs file, where the rootFrame is created, just after creation, add
rootFrame.ContentTransitions = null;
.– Romasz
Apr 10 '15 at 10:31
Brilliant. That was already in App.xaml.cs but it lead me on to the Frame.Navigated event where I could change the handler to only add back the transitions if
NavigationEventArgs.SourcePageType != typeof(SplashPage)
– dumbledad
Apr 10 '15 at 10:40
Brilliant. That was already in App.xaml.cs but it lead me on to the Frame.Navigated event where I could change the handler to only add back the transitions if
NavigationEventArgs.SourcePageType != typeof(SplashPage)
– dumbledad
Apr 10 '15 at 10:40
You may also think of disabling frame's transition and define them for every page in xaml if needed.
– Romasz
Apr 10 '15 at 10:48
You may also think of disabling frame's transition and define them for every page in xaml if needed.
– Romasz
Apr 10 '15 at 10:48
add a comment |
2 Answers
2
active
oldest
votes
I would try to disable default Frame.ContentTransitions by setting it to null, just after the rootFrame is created in App.xaml.cs file (don't forget to handle different events - Launched/ShareTarget/Activated - if needed):
rootFrame.ContentTransitions = null
once you have done that, pages shouldn't have transition. Then if you want, you can bring back or set new transitions for Frame's content upon specific circumstances, or set transitions for pages individually, for example in Page's XAML:
<Page.Transitions>
<TransitionCollection>
<EntranceThemeTransition/>
</TransitionCollection>
</Page.Transitions>
1
I am using a WebView in a Windows 10 Universal App and the animation was causing a "page load flicker". Removing <Frame.ContentTransitions> in the AppShell.xaml solved the issue.
– Kris Krause
Sep 23 '15 at 10:19
add a comment |
For those who want to do the same thing for a Windows 10 UWP app, it can be achieved like this:
// Navigate to your first page without a transition
Frame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo());
According to this MSDN document.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29559071%2fhow-do-i-set-frame-navigate-to-happen-immediately-with-no-transition%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I would try to disable default Frame.ContentTransitions by setting it to null, just after the rootFrame is created in App.xaml.cs file (don't forget to handle different events - Launched/ShareTarget/Activated - if needed):
rootFrame.ContentTransitions = null
once you have done that, pages shouldn't have transition. Then if you want, you can bring back or set new transitions for Frame's content upon specific circumstances, or set transitions for pages individually, for example in Page's XAML:
<Page.Transitions>
<TransitionCollection>
<EntranceThemeTransition/>
</TransitionCollection>
</Page.Transitions>
1
I am using a WebView in a Windows 10 Universal App and the animation was causing a "page load flicker". Removing <Frame.ContentTransitions> in the AppShell.xaml solved the issue.
– Kris Krause
Sep 23 '15 at 10:19
add a comment |
I would try to disable default Frame.ContentTransitions by setting it to null, just after the rootFrame is created in App.xaml.cs file (don't forget to handle different events - Launched/ShareTarget/Activated - if needed):
rootFrame.ContentTransitions = null
once you have done that, pages shouldn't have transition. Then if you want, you can bring back or set new transitions for Frame's content upon specific circumstances, or set transitions for pages individually, for example in Page's XAML:
<Page.Transitions>
<TransitionCollection>
<EntranceThemeTransition/>
</TransitionCollection>
</Page.Transitions>
1
I am using a WebView in a Windows 10 Universal App and the animation was causing a "page load flicker". Removing <Frame.ContentTransitions> in the AppShell.xaml solved the issue.
– Kris Krause
Sep 23 '15 at 10:19
add a comment |
I would try to disable default Frame.ContentTransitions by setting it to null, just after the rootFrame is created in App.xaml.cs file (don't forget to handle different events - Launched/ShareTarget/Activated - if needed):
rootFrame.ContentTransitions = null
once you have done that, pages shouldn't have transition. Then if you want, you can bring back or set new transitions for Frame's content upon specific circumstances, or set transitions for pages individually, for example in Page's XAML:
<Page.Transitions>
<TransitionCollection>
<EntranceThemeTransition/>
</TransitionCollection>
</Page.Transitions>
I would try to disable default Frame.ContentTransitions by setting it to null, just after the rootFrame is created in App.xaml.cs file (don't forget to handle different events - Launched/ShareTarget/Activated - if needed):
rootFrame.ContentTransitions = null
once you have done that, pages shouldn't have transition. Then if you want, you can bring back or set new transitions for Frame's content upon specific circumstances, or set transitions for pages individually, for example in Page's XAML:
<Page.Transitions>
<TransitionCollection>
<EntranceThemeTransition/>
</TransitionCollection>
</Page.Transitions>
answered Apr 10 '15 at 11:01
RomaszRomasz
27.3k1167122
27.3k1167122
1
I am using a WebView in a Windows 10 Universal App and the animation was causing a "page load flicker". Removing <Frame.ContentTransitions> in the AppShell.xaml solved the issue.
– Kris Krause
Sep 23 '15 at 10:19
add a comment |
1
I am using a WebView in a Windows 10 Universal App and the animation was causing a "page load flicker". Removing <Frame.ContentTransitions> in the AppShell.xaml solved the issue.
– Kris Krause
Sep 23 '15 at 10:19
1
1
I am using a WebView in a Windows 10 Universal App and the animation was causing a "page load flicker". Removing <Frame.ContentTransitions> in the AppShell.xaml solved the issue.
– Kris Krause
Sep 23 '15 at 10:19
I am using a WebView in a Windows 10 Universal App and the animation was causing a "page load flicker". Removing <Frame.ContentTransitions> in the AppShell.xaml solved the issue.
– Kris Krause
Sep 23 '15 at 10:19
add a comment |
For those who want to do the same thing for a Windows 10 UWP app, it can be achieved like this:
// Navigate to your first page without a transition
Frame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo());
According to this MSDN document.
add a comment |
For those who want to do the same thing for a Windows 10 UWP app, it can be achieved like this:
// Navigate to your first page without a transition
Frame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo());
According to this MSDN document.
add a comment |
For those who want to do the same thing for a Windows 10 UWP app, it can be achieved like this:
// Navigate to your first page without a transition
Frame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo());
According to this MSDN document.
For those who want to do the same thing for a Windows 10 UWP app, it can be achieved like this:
// Navigate to your first page without a transition
Frame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo());
According to this MSDN document.
answered Nov 14 '18 at 20:26
t.m.t.m.
737717
737717
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29559071%2fhow-do-i-set-frame-navigate-to-happen-immediately-with-no-transition%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think it should work, fi you disable default transitions for a frame - in app.xaml.cs file, where the rootFrame is created, just after creation, add
rootFrame.ContentTransitions = null;
.– Romasz
Apr 10 '15 at 10:31
Brilliant. That was already in App.xaml.cs but it lead me on to the Frame.Navigated event where I could change the handler to only add back the transitions if
NavigationEventArgs.SourcePageType != typeof(SplashPage)
– dumbledad
Apr 10 '15 at 10:40
You may also think of disabling frame's transition and define them for every page in xaml if needed.
– Romasz
Apr 10 '15 at 10:48