共用方式為


SplashScreenSource (Silverlight Plug-in Object)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the local URI of the splash screen XAML page. The splash screen is displayed while the Silverlight core components such as the Silverlight CLR runtime and the content package for a managed API application are loading.

Syntax

object Element

<object ...>
  <param name="splashscreensource" value="uri"/>
  ...
</object>

Silverlight.js

Not implemented in Silverlight.js.

JavaScript

Do not use runtime JavaScript against the DOM; use the object parameter as the handler attachment point.

COM

IXcpControl::SplashScreenSource

Managed Code

Not available.

Property Value

The local URI of the content to load as the splash screen source. The default is null.

Remarks

The splash screen for a Silverlight-based application is generally used only if the main body of the application uses the managed API. Typically, you implement a splash screen only if the main body of the application takes enough time to load to justify displaying the splash screen.

The splash screen XAML page must always use the JavaScript API. Any JavaScript code for the splash screen that supports the XAML, such as event handlers for user input events, must in a script block or in an included script file that is referenced from the hosting HTML page.

For security reasons, the splash screen XAML page must be served from the same domain as the hosting HTML page for the Silverlight-based application. It must also be from the same domain as the document that is referenced in the Source property.

A SplashSceenSource URI can represent a relative path. The relative path is based on the location of the HTML page that contains the object element. If you use a relative path, always use the slash character (/) for traversal. Silverlight does not support the backslash character (\) for relative paths.

For more information about how to use splash screens, see Silverlight Splash Screens.