100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
.NET

Silverlight Out-of-Browser Apps

How to configure, install, and elevate Silverlight applications so they run as standalone desktop apps outside the browser sandbox.

Media and GraphicsIntermediate9 min readJul 10, 2026
Analogies

Running Silverlight Outside the Browser

Out-of-browser (OOB) support lets a Silverlight application run as a standalone desktop process with its own window, taskbar entry, and Start menu shortcut, rather than being embedded in a browser tab. Users trigger installation by right-clicking the running application and choosing Install, or a page can call Application.Current.Install() from a button click handler.

🏏

Cricket analogy: A fan installing a dedicated cricket scores widget onto their desktop instead of always opening a browser tab works the same way calling Application.Current.Install() copies a Silverlight app out of the browser into its own desktop shortcut.

Enabling and Installing OOB Apps

OOB support is declared in App.xaml with an OutOfBrowserSettings block that sets ShortName, Blurb, IconImages, and default WindowSettings such as Width and Height. At runtime, code can branch on Application.Current.IsRunningOutOfBrowser to show different UI or enable different features depending on whether the app is embedded in a browser or running as an installed shortcut.

🏏

Cricket analogy: A broadcaster configuring the app's title, icon, and window size in a settings file before publishing it to fans works the same way OutOfBrowserSettings in App.xaml declares ShortName, Blurb, and WindowSettings before a Silverlight app can be installed.

Elevated Trust and File System Access

By default, OOB apps still run in the browser's security sandbox, restricted to isolated storage. Setting RequireElevatedPermissions to true in OutOfBrowserSettings requests elevated trust; once a user installs and grants that trust, the app gains access to the full local file system via System.IO, COM interop, and can request EnableGPUAcceleration for hardware-accelerated rendering.

🏏

Cricket analogy: Giving ground staff special access badges to enter restricted pitch areas that regular spectators can't works the same way RequireElevatedPermissions grants a Silverlight OOB app access to the full file system via System.IO that sandboxed browser apps never get.

xml
<Deployment.OutOfBrowserSettings>
  <OutOfBrowserSettings ShortName="Field Reporter"
                        Blurb="Offline-capable inspection reporting tool"
                        EnableGPUAcceleration="True">
    <OutOfBrowserSettings.Icons />
    <OutOfBrowserSettings.WindowSettings>
      <WindowSettings Width="900" Height="650" WindowStyle="None" Title="Field Reporter" />
    </OutOfBrowserSettings.WindowSettings>
  </OutOfBrowserSettings>
</Deployment.OutOfBrowserSettings>
csharp
private void InstallButton_Click(object sender, RoutedEventArgs e)
{
    if (Application.Current.InstallState == InstallState.NotInstalled)
    {
        Application.Current.Install();
    }
}

// Elsewhere, after elevated trust is granted:
private void SaveReport(string xml)
{
    string path = System.IO.Path.Combine(
        Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
        "reports\\latest.xml");
    System.IO.File.WriteAllText(path, xml);
}

RequireElevatedPermissions only takes effect for out-of-browser installs; a trusted app still embedded in a browser tab remains sandboxed. Also, elevated-trust APIs like unrestricted System.IO access and COM interop will throw a SecurityException if called before the user has installed and granted elevated trust.

Window Chrome and Updates

Setting WindowStyle to None in WindowSettings removes the OS-drawn title bar, letting an app draw fully custom chrome and implement its own drag-to-move behavior by calling Window.DragMove() from a MouseLeftButtonDown handler on a custom title bar element. Installed apps can also check for updates by calling Application.Current.CheckAndDownloadUpdateAsync() and handling CheckAndDownloadUpdateCompleted.

🏏

Cricket analogy: A broadcast app letting viewers drag a floating scorecard window anywhere on their second monitor by its custom title bar is the same as a borderless Silverlight OOB app implementing DragMove on a MouseLeftButtonDown handler for a custom chrome.

When WindowStyle is None, remember to also implement your own minimize, restore, and close affordances and wire ResizeMode manually if resizing should remain available, since the OS-drawn chrome that normally provides those controls is gone entirely.

  • OOB apps run as standalone desktop processes after a user installs via right-click or Application.Install().
  • OutOfBrowserSettings in App.xaml configures ShortName, Blurb, IconImages, and WindowSettings.
  • Application.Current.IsRunningOutOfBrowser lets code branch between browser and installed behavior.
  • RequireElevatedPermissions unlocks full System.IO file access, COM interop, and GPU acceleration.
  • Elevated-trust APIs throw a SecurityException if called before the user grants trust at install time.
  • WindowStyle.None enables fully custom chrome, implemented with Window.DragMove() for dragging.
  • CheckAndDownloadUpdateAsync lets an installed app silently update itself to the latest published XAP.

Practice what you learned

Was this page helpful?

Topics covered

#NET#SilverlightStudyNotes#MicrosoftTechnologies#SilverlightOutOfBrowserApps#Silverlight#Out#Browser#Apps#StudyNotes#SkillVeris