Share via


ScaleMode Enumeration

Specifies how the Silverlight source should be scaled to fit in the Silverlight host.

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

Syntax

'Declaration
Public Enumeration ScaleMode
'Usage
Dim instance As ScaleMode
public enum ScaleMode

Members

Member name Description
None Specifies that no scaling is performed.
Zoom Specifies that scaling is performed to size the Silverlight content proportionally to fill the host area.
Stretch Specifies that scaling is performed to fill the host area horizontally and vertically.

Examples

The following example demonstrates how to use the ScaleMode attribute with the MediaPlayer control.

<asp:MediaPlayer runat="server" ID="MediaPlayer1" ScaleMode="Stretch" AutoPlay="true" 
    MediaSource="../media/expressionstudio.wmv" Height="240" Width="320"
    PluginBackgroundColor="Black"  MediaSkinSource="../skins/Expression.xaml"/>
<asp:MediaPlayer runat="server" ID="MediaPlayer1" ScaleMode="Stretch" AutoPlay="true" 
    MediaSource="../media/expressionstudio.wmv" Height="240" Width="320"
    PluginBackgroundColor="Black"  MediaSkinSource="../skins/Expression.xaml"/>

Platforms

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

See Also

Reference

System.Web.UI.SilverlightControls Namespace