locked
Automatically start in FullScreen when OOB RRS feed

  • Question

  • Hi,

    I already understand that in WEB mode a silverlight application can only be opened in full screen by a client initiated event.

    But is there a way to set the FullScreen to true at the application startup when we are in OOB?

    I have a kiosk application that must starts automatically at logon.

    Thanks

    Daniel

    Wednesday, June 16, 2010 1:24 PM

Answers

  • I was about to do the exact same thing as you suggested but I just came up with a better solution.

    1.  At application startup I set the windowState to "Maximized" (like you suggested earlier)

    2.  Then I need to hide my taskbar completely (using Auto-Hide the taskbar in "Taskbar and Start Menu Properties").  This is to avoid having a blank spot in the bottom of my app when running.

    3. I created a simple Startup.bat containing the following :
            taskkill /f /im "explorer.exe"
            "c:\program files\Microsoft Silverlight\sllauncher.exe" 3216551.mycomputer

    4.  Move that batch file in the windows startup menu.

    Thanks for your help!

    Daniel

    Daniel

    Thursday, June 17, 2010 12:20 PM

All replies

  • I believe this is what you want.

                if (App.Current.IsRunningOutOfBrowser)
                {            
                    if (Application.Current.HasElevatedPermissions)
                    {
                        Application.Current.MainWindow.WindowState = WindowState.Maximized;
                    }
                }
     
    Wednesday, June 16, 2010 3:40 PM
  • Thanks for the suggestion but it's not exactly what I am looking for. 

    With that method, the windows bottom task bar is still displayed! :/

    Daniel

    Wednesday, June 16, 2010 8:55 PM
  • The only other thing I've been able to find is that under the OOB set up in the project, you can specify the size of the window and get rid of the chrome. You can subscribe to the full screen changing events, but that requires some user interaction again. I was hoping that you could either set a flag in SLLauncher.exe, but there are very few parameters there.

    Thursday, June 17, 2010 9:42 AM
  • Yes I already checked the SLLauncher parameters and there is nothing to start in fullscreen there, would be a nice feature though...

    The window size in OOB set up, works well if you already know the screen resolution. 

    But would you know a way, to get the screen resolution in the runtime, that way I could resize my main window accordingly.

    Daniel

    Thursday, June 17, 2010 9:50 AM
  • No, just the browser resolution - you can set the oob screen size at run time, but no way to find the actual screen size - bummer.

    Thursday, June 17, 2010 10:02 AM
  • Its sad since you can get those values when in Browser mode using : 

    int screenHeight = Int32.Parse(HtmlPage.Window.Eval("screen.height").ToString();
    int screenWidth = Int32.Parse(HtmlPage.Window.Eval("screen.width").ToString();
    Daniel
    Thursday, June 17, 2010 10:43 AM
  • Since you're designing a kiosk mode app, can you have a popup happen when the oob app is first installed that asks the installer what the screen resolution is, then stores it in isolated storage for retrieval on subsequent start ups?

    Thursday, June 17, 2010 10:53 AM
  • I was about to do the exact same thing as you suggested but I just came up with a better solution.

    1.  At application startup I set the windowState to "Maximized" (like you suggested earlier)

    2.  Then I need to hide my taskbar completely (using Auto-Hide the taskbar in "Taskbar and Start Menu Properties").  This is to avoid having a blank spot in the bottom of my app when running.

    3. I created a simple Startup.bat containing the following :
            taskkill /f /im "explorer.exe"
            "c:\program files\Microsoft Silverlight\sllauncher.exe" 3216551.mycomputer

    4.  Move that batch file in the windows startup menu.

    Thanks for your help!

    Daniel

    Daniel

    Thursday, June 17, 2010 12:20 PM
  • LOL - another hack around a MS product! Brilliant!

    Are you taking the chrome off the oob app window?

    Thursday, June 17, 2010 12:23 PM
  • Yes indeed! :)

    thanks again for your help!

    Thursday, June 17, 2010 1:10 PM