Share via


Silverlight.MinimumVersion Property

Gets or sets the minimum Silverlight plug-in host version that is required for this Silverlight-based application.

Namespace:  System.Web.UI.SilverlightControls
Assembly:  System.Web.Silverlight (in System.Web.Silverlight.dll)

Syntax

'Declaration
<BrowsableAttribute(True)> _
<TypeConverterAttribute(GetType(VersionConverter))> _
Public Overridable Property MinimumVersion As String
    Get
    Set
'Usage
Dim instance As Silverlight
Dim value As String

value = instance.MinimumVersion

instance.MinimumVersion = value
[BrowsableAttribute(true)]
[TypeConverterAttribute(typeof(VersionConverter))]
public virtual string MinimumVersion { get; set; }

Property Value

Type: System.String
The minimum Silverlight plug-in host version.

Remarks

The default value is "1.0".

If the Silverlight application is accessed on a computer that does not have the minimum version of the Silverlight plug-in as specified by the MinimumVersion property, the required version of the Silverlight plug-in is automatically installed without user interaction if the AutoUpgrade property is true.

Otherwise, the Silverlight template specified in the PluginNotInstalledTemplate is displayed (or the default Silverlight installation template, if the PluginNotInstalledTemplate is not specified).

Examples

The following example demonstrates how to use the set the MinimumVersion property of the Silverlight control to a value that must be the minimum version number of the Silverlight plug-in that the user must have to view the Silverlight content.

If the user does not have the minimum version indicated as the value of the MinimumVersion property, the user will be prompted to install the Silverlight plug-in.

<%@ Page Language="VB" AutoEventWireup="true" %>

<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
    TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="https://www.w3.org/1999/xhtml" style="height:100%;">
<head runat="server">
    <title>Test Page For myExample</title>
</head>
<body style="height:100%;margin:0;">
    <form id="form1" runat="server" style="height:100%;">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div  style="height:100%;">
            <asp:Silverlight ID="Xaml1" runat="server" Source="../ClientBin/myExample.xap" MinimumVersion="2.0" Width="100%" Height="100%" />
        </div>
    </form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" %>

<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
    TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="https://www.w3.org/1999/xhtml" style="height:100%;">
<head runat="server">
    <title>Test Page For myExample</title>
</head>
<body style="height:100%;margin:0;">
    <form id="form1" runat="server" style="height:100%;">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div  style="height:100%;">
            <asp:Silverlight ID="Xaml1" runat="server" Source="../ClientBin/myExample.xap" MinimumVersion="2.0" Width="100%" Height="100%" />
        </div>
    </form>
</body>
</html>

Platforms

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

See Also

Reference

Silverlight Class

Silverlight Members

System.Web.UI.SilverlightControls Namespace

AutoUpgrade

PluginNotInstalledTemplate