|
|
As a UI Designer I've come to this page to see an actual sample. I'm just finding sample code. It would be nice to SEE the sample - even if it's just a static screen capture.
Hello, I'd like to use the Extended splash Screen, while loading Website data in an iframe. How can I remove the splash Screen, when data is loaded?
All apps are required to have splash screens. In order to customize your splash screen, you can use the package manifest editor to choose a custom image and/or background color. This sample provides guidance for displaying an extended splash screen in your app. The extended splash screen is a component that is displayed by your app in order to continue the splash screen experience in a seamless manner. An appropriate usage of this could be to display an extended splash screen while network requests are made (imagine a Weather app getting the current forecast, for example). This way, your users experience a smooth and continuous loading flow on launch rather than staring at an empty first view while content is retrieved. Because the extended splash screen is controlled by your app, it allows you to make the transition to your landing page whenever you are ready to present UI to the user. Hope that helps! If you have any further questions, please don't hesitate to ask. Justin Cooperman
Justin, The "appropriate usage" you list is exactly what I want to do, but can't see in the sample where to tell main screen to start loading and where to tell the splash screen to navigate to the main screen when it's ready. Thanks, Don
Where to add a line to immediately go in main page for it to load its data ? I don't really understand how to implement it in an existing project where the main page loads intensive data so I can use this extended splash screen in order to show a ProgressRing. I modified the ExtendedSplash.xaml to show the ProgressRing and I did remove the button LEARN MORE and it's event now I need the app to go immediately in the MainPage in order to load the data but I don't know where to add this line
Did you get an answer to this? I have the same issue. I want to insert a splash screen that displays while my main screen is loading (using web service calls), but don't see where to start the main page loading and then switch to that page when it's ready. Several places say you can do this, but the sample doesn't display this functionality (or I missed it.)
I would suggets that you guys add screenshot to your codes showing your code results or outputs and important sections
HI, How can I fire a message dialog within the extended splash screen? I know how to use a message dialog, but I'm not able to show it within the splash screen. I'm trying to emulate a login screen in my app. Thank you
I added Frame.Navigate(typeof(MainPage ), this); inside the Dismissed Event Handler without success. It's still waiting for me to press the button and in the button click event its the same line so I don't understand why I can't go directly to MainPage in order to load the data and show the app
You need to invoke a your CoreDispatcher. For example
#region Members Fields
private CoreDispatcher m_oCoreDispatch er;
#endregion
#region Constructors
public ExtendedSplashS creen (SplashScreen p_oSplashScreen , bool p_bDimissed)
{
this.Initialize Component();
this.m_oCoreDis patcher = Window.Current. Dispatcher;
this.m_bDimisse d = true;
}
#endregion
#region Methods
internal void splashScreenDis missed(SplashSc reen sender, object args)
{
this.m_bDimisse d = true;
//We have to synchronize with the main thread
this.m_oCoreDis patcher.RunAsyn c(CoreDispatche rPriority.Norma l, new DispatchedHandl er(dispatch));
}
private void dispatch()
{
var rootFrame = new Frame();
rootFrame.Navig ate(typeof(Main Page));
// Place the frame in the current Window and ensure that it is active
Window.Current. Content = rootFrame;
Window.Current. Activate();
}
#endregion
I've added ExtendedSplash to my own application and in ExtendedSplash dismissed handler I've put my own code as it states so;
// Include code to be executed when the system has transitioned from the splash screen to the extended splash screen (application's first view).
void DismissedEventH andler(SplashSc reen sender, object e)
{
dismissed = true;
// Navigate away from the app's extended splash screen after completing setup operations here...
// This sample navigates away from the extended splash screen when the "Learn More" button is clicked.
// Navigate to mainpage
rootFrame.Navig ate(typeof(Main Page));
// Place the frame in the current Window
Window.Current. Content = rootFrame;
}
But I'm getting a wrong thread error;
The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_TH READ))
Here's also my app.xaml code;
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used when the application is launched to open a specific file, to display
/// search results, and so forth.
/// </summary>
/// <param name="args">Det ails about the launch request and process.</param >
protected override async void OnLaunched(Laun chActivatedEven tArgs args)
{
if (args.PreviousE xecutionState != ApplicationExec utionState.Runn ing)
{
bool loadState = (args.PreviousE xecutionState == ApplicationExec utionState.Term inated);
ExtendedSplash extendedSplash = new ExtendedSplash( args.SplashScre en, loadState);
Window.Current. Content = extendedSplash;
}
Window.Current. Activate();
}
Any ideas?