Windows Media Player Control SDK Banner Art
*Contents *Index  *Topic Contents
*Previous Topic: AutoRewind
*Next Topic: AutoStart

AutoSize Property

Sets or retrieves a value indicating whether the Microsoft® Windows Media™ Player control automatically sizes to the proportions of the original media rendered at the current display size.

Syntax

MediaPlayer.AutoSize [ = bAutoSize ]

Possible Values

bAutoSize Boolean value indicating whether the Windows Media Player changes size to conform to the size of the content. If true, automatic sizing is enabled. If false, the Windows Media Player retains the width and height set at design time.
This property is read/write. See Remarks for default values.

Remarks

For Web page applications, the default value is true unless width and height parameters are specified at design time, in which case the default value is false. For Windows-based applications the default is false, because the width and height of the control must be set at design time.

If this property is true, the Windows Media Player control overrides width and height parameters. When a clip is loaded, the control changes its dimensions to accommodate the media stream, as specified by the DisplaySize property.

If this property is false, the image is centered in the video display panel. If the dimensions of the video image are smaller than the display panel, the Windows Media Player control adds a video border around the image. If the video image is larger than the specified display panel area, the image shrinks to fit into the display panel. The Windows Media Player renders data more efficiently when it resizes to the dimensions of the source content.

Note: When the FileName property is set to DVD:, enabling DVD playback, the default value for the AutoSize property is always true, even if the width and height parameters are specified at design time. To ensure that AutoSize is false when the width and height parameters are specified, set the property to false by using the PARAM tag, as follows.

<PARAM NAME="AutoSize" VALUE="0">

For more information, see Setting Control Properties with the PARAM Tag in the article Placing the Windows Media Player Control in a Web Page.

See Also

DisplaySize, Customizing the User Interface


Top of Page Top of Page
© 1999 Microsoft and/or its suppliers. All rights reserved. Terms of Use.