This topic has not yet been rated - Rate this topic

Silverlight.Source Property

Gets or sets the location of the Silverlight content to display.

Namespace:  System.Web.UI.SilverlightControls
Assembly:  System.Web.Silverlight (in System.Web.Silverlight.dll)
[BindableAttribute(true)]
[ThemeableAttribute(true)]
public virtual string Source { get; set; }

Property Value

Type: System.String
The location of the XAML source file or XAP source package.

Use the Source property to specify the URL of the XAML source file or XAP source package.

XAP packages are supported only if the MinimumVersion property is "2.0" or greater.

If the Source property value is a .xaml file, the file cannot contain any Silverlight 2 content. For example, the top-level element in the .xaml file may be a Canvas element, but not a UserControl or StackPanel element, since these are valid only for Silverlight 2 content.

Also, when using a .xaml file as the Source property, there cannot be any attributes in the XAML elements that are valid for only Silverlight 2 content, such as an x:Class attribute since you cannot have managed code code-behind (C# or Visual Basic) files for Silverlight 1.0 content.

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ