Skip to content

Aaron Cornelius: Building a fast splash screen for a WPF application

July 10, 2007

In "Distract your WPF application users with a splash screen!", Aaron (wiredprairie.us) shows how to use a Win32 based splash screen.  I know that our sdk team was planning to write a similar sample soon (may have already).  I’ll make sure they spend some energy reviewing this sample.

One minor problem that I see here is that it requires you to modify your Main(), which means you must remove app.xaml.  So you can’t do application level resources in Blend, etc…  We need to figure out ways around that problem.  Ideally, we’d have a setting which didn’t generate a Main(), so you could hand code it, but we’d still support storing resources in app.xaml.

The clr team and the wpf team are working to improve cold start time for WPF in 3.5 and beyond.

From → WPF

5 Comments
  1. Aaron permalink

    Rob — it is definitely a downside that developers need to modify Main. Unfortunately friendly in this case doesn\’t mean speed. :(   With a slight bit of pressure, I\’ll release the entire source code … not like it\’s that magical or anything though.
     
    If we can\’t get some code to be injected before the Application Run is called, a splash screen is of limited benefit. I couldn\’t
     
    I recall having conversations with many people (@ MS) promising that code — so I thought it was time to write one finally.

  2. Rob permalink

    Yes, getting something visible before app.run is called is key.
    Thanks for posting your sample.
    -Rob

  3. Unknown permalink

    lotro gold lord of the rings gold lord of the rings online gold lotro gold lord of the rings gold lord of the rings
    online gold Warhammer gold
    Warhammer online gold Warhammer money War gold War money Tabula Rasa Credit lotro gold lord of the rings gold lord of the rings online gold lord of the
    rings online gold lord of the rings
    gold Tabula Rasa Credit World of Warcraft gold PotBS Doubloon Pirates of the
    Burning Sea Doubloon PotBS Gold Pirates of the Burning Sea
    Gold lotro gold lord of the rings gold lord of the rings online gold Tabula Rasa Credit Warhammer gold Warhammer online gold PotBS Doubloon PotBS gold Pirates of the Burning Sea
    gold Pirates of the
    Burning Sea Doubloon

  4. Unknown permalink

    Does anyone have an update on this?  I\’ve implemented a splash screen and removed my app.xaml.  Now I can\’t get my windows to display in Design view.

  5. Unknown permalink

    For anyone who\’s curious, the solution to my Design view problem was to retain my app.xaml file but selectively build it, as in the following link:blogs.msdn.com/expression/archive/2008/04/09/creating-a-wpf-blend-project-that-loads-resources-in-code.aspx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: