Locked How to make a splash screenin lightswitch??

  • Thursday, September 30, 2010 10:39 AM
     
     

    Hi,

    I am trying to add a splash screen in the application, but I cannot find a clue. Is this doable in lightwitch or not?

     

    Thanks,

    Joe

All Replies

  • Thursday, September 30, 2010 1:22 PM
     
     Answered

    The only way I've done it so far is to make a Data Entry screen (default) with no Entity, create a custom control with my splash layout (company, etc.) and make that the Home screen. There is no clean way to make it disappear though, as it stays open until closed. I suppose you could do some timer code on Loaded, but I haven't tried that. The mechanics of building a custom control and screen based on its contents are illuminated in one of Michael Washington's blog posts, but his server is down at the moment.

    http://lightswitch.adefwebserver.com/blog

     


    If you believe that I've answered your question, please remember to mark it as answered.

    MicroApplications, Inc. -- Information Systems Integration and Custom Software Development
  • Thursday, September 30, 2010 11:44 PM
     
     
    I think a betterr idea is to create a splsh screen image with whatever you want to display and save it as a image file. Now add this as a logo in the Application settings page.
    mysorian
  • Friday, October 01, 2010 12:37 AM
    Moderator
     
     

    That would work if you aren't showing a default screen, but if you need a default screen on startup the logo would be hidden behind it. Think of the logo property as being a background image for the shell.

    Regards,


    Steve Hoag Microsoft aka the V-Bee
  • Friday, October 01, 2010 1:54 PM
     
     
    You are dead right on that. However, I am somewhat intrigued by this logo property as well as the Application Icon property which both find their images in the Resources folder. Why would the logo has this as a background property of the shell? Why wouldn't the Application Icon show up on the screen no matter what the image format is? Any documentation on this would be helpful. Why would the logo property show up on a part of the screen when the Culture property is set to some other country (I don't remember now as to on which country setting this happened).

    mysorian
  • Friday, October 01, 2010 3:55 PM
    Moderator
     
     Answered

    There are some bugs with the Logo property in Beta 1, so the behavior that you are seeing now is likely to change.

    The Icon property specifies the icon that is shown in the Start menu and taskbar, it doesn't show up on a screen. It must be a .png image; this is simply a requirement for icons.

    Culture shouldn't have any effect on the Logo property - if you are seeing otherwise, please report it.

    The Logo and Icon properties are documented here: http://msdn.microsoft.com/en-us/library/ff852009.aspx

    Regards,


    Steve Hoag Microsoft aka the V-Bee
  • Thursday, November 25, 2010 4:27 PM
     
     

    As a migration example I'm migrating Northwind Access Database to LightSwitch.

    In my startup form. I add a timer to in the Startup_Loaded method like this:

    Timer timer;

    partial void NewStartup_Loaded()

    {

    this.Logo = Application.LoadImage("logo.png");

    this.Paragraph1 = "Welcome to Northwind Traders, a sample database you can use to learn about Microsoft Access. You can experiment with the data stored in Northwind, and use the forms, reports, and other database objects as models for your own database.";

    this.Paragraph2 = "All the objects in Northwind are available from the Database window, which will be displayed when you click OK. In\r\nthe Database window, you can display descriptions of the objects by clicking Details on the View menu.";

    this.HideStartupFormLabel = "Don't show this screen again.";

    this.Label4 = "The names of companies, products, people, characters, and/or data mentioned herein are fictitious and are in no way intended to represent any real individual, company, product, or event, unless otherwise noted.";

    timer = new Timer((x) => { this.Close(false); }, null, 3000, 1);

    }

    but I'm getting an exception that says that it is not valid to execute the operation on the current thread.

    What will be an apropiate way to do this?

    Regards,

    ----------------------------------------------------------------------

    Mauricio Rojas R&D Artinsoft blogs.artinsoft.net\mrojas

     

     

  • Thursday, November 25, 2010 6:41 PM
     
     

    The only way I've done it so far is to make a Data Entry screen (default) with no Entity, create a custom control with my splash layout (company, etc.) and make that the Home screen. There is no clean way to make it disappear though, as it stays open until closed. I suppose you could do some timer code on Loaded, but I haven't tried that. The mechanics of building a custom control and screen based on its contents are illuminated in one of Michael Washington's blog posts, but his server is down at the moment.

    http://lightswitch.adefwebserver.com/blog

     


    If you believe that I've answered your question, please remember to mark it as answered.

    MicroApplications, Inc. -- Information Systems Integration and Custom Software Development

    That is a bad link. The site is up :)

    use:

    http://lightswitch.adefwebserver.com/

    or:

    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/4/A-LightSwitch-Home-Page.aspx


    http://www.adefwebserver.com

    http://lightswitch.adefwebserver.com


  • Thursday, April 07, 2011 10:55 PM
     
     
    Has there been any progress on an easier solution to creating a splash screen?
  • Thursday, April 07, 2011 11:31 PM
    Moderator
     
     

    Hi,

    Creating a splash screen is not a mainstream scenario supported in V1, but the method shown in Michael's blog (in the answer to the original post) provides an easy workaround.

    Hope this helps,


    Steve Hoag Microsoft aka the V-Bee
  • Friday, April 08, 2011 12:25 AM
     
     Proposed

    Hi Mauricio,

    You need the code to execute on the screen's thread, so change your code to: 

    "this.Details.Dispatcher.BeginInvoke(this.Close(false))"

    Yann

    • Proposed As Answer by Yann Duran Friday, April 08, 2011 12:25 AM
    •  
  • Thursday, May 12, 2011 3:29 PM
     
     

    Hi Steve,

    I followed the link to Michael's blog, which has a ton of useful information; however, I do not see the Splashscreen solution. The link takes me to his home page not to the solution.

    Best Regards,

    Kellylee

    "LightSwitch is the new Application Express"

     

  • Thursday, May 12, 2011 3:31 PM
     
     

    Hi Steve,

    I followed the link to Michael's blog, which has a ton of useful information; however, I do not see the Splashscreen solution. The link takes me to his home page not to the solution.

    Best Regards,

    Kellylee

    "LightSwitch is the new Application Express"

     


    Here is the updated link:

    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/4/A-LightSwitch-Home-Page.aspx


    http://www.adefwebserver.com

    http://LightSwitchHelpWebsite.com

  • Friday, May 13, 2011 10:51 PM
     
     

    Hi Micheal,

    I was actually looking to create a title and then a back image to create a home page.  Is that possible?

    Best Regards,

    Kellylee

    "LightSwitch is the new Application Express"

  • Friday, May 13, 2011 11:20 PM
     
     

    Hi Micheal,

    I was actually looking to create a title and then a back image to create a home page.  Is that possible?

    Best Regards,

    Kellylee

    "LightSwitch is the new Application Express"


    You can create a Silverlight Custom Control, and put that on the page.

    Then you can do practically anything. Here is an introduction to Silverlight Custom Controls:

    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/2/Creating-A-LightSwitch-Custom-Silverlight-Control.aspx


    http://www.adefwebserver.com

    http://LightSwitchHelpWebsite.com

  • Friday, May 13, 2011 11:50 PM
     
     

    Hi Michael,

    I appreciate you giving me some great advice.  Unfortunately, I don't know much about Silverlight.  I created a custom control according to your instructions.  Now, how do I attach an image to it that I've already created?

    Best Regards,

    Kellylee

    "LightSwitch is the new Application Express"

     

  • Saturday, May 14, 2011 12:18 AM
     
     Proposed

    Hi Michael,

    I appreciate you giving me some great advice.  Unfortunately, I don't know much about Silverlight.  I created a custom control according to your instructions.  Now, how do I attach an image to it that I've already created?

    Best Regards,

    Kellylee

    "LightSwitch is the new Application Express"

     


    This should help:

    http://www.silverlightshow.net/items/Using-the-Image-control-in-Silverlight-2-Beta-1.aspx


    http://www.adefwebserver.com

    http://LightSwitchHelpWebsite.com

    • Proposed As Answer by Kellylee22 Sunday, May 15, 2011 8:25 PM
    •  
  • Sunday, May 15, 2011 8:25 PM
     
     

    Hi Micheal,

    Thank you.  I spent the day getting this to work.  I finally just finished creating a nice home page.  I appreciate your help.

     

    Kellylee

    "LightSwitch is the new Application Express"