次の方法で共有


VIEW Element

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The VIEW element contains the user interface details of a skin, and uses the attributes, methods, and event handlers shown in the following tables.

Multiple VIEW elements can be defined as children of the THEME element of a skin to provide different interfaces for different situations. VIEW elements cannot be specified as children of any other element, and they contain all other skin elements. Note that each view has its own variable scope, which means it cannot share attribute values with other views.

The view global attribute can be used to reference a specific VIEW element from anywhere within it. This is an alternative to using its id attribute, which must be used from within other VIEW elements or from within the THEME element.

The VIEW element supports the following attributes. Attributes marked with an asterisk (*) are also supported by the SUBVIEW element.

Attribute Description
backgroundColor * Specifies or retrieves the background color of the VIEW or SUBVIEW.
backgroundImage * Specifies or retrieves the background image of the VIEW or SUBVIEW.
backgroundImageHueShift Specifies or retrieves the amount by which the hue of the background image is shifted.
backgroundImageSaturation Specifies or retrieves the saturation value of the background image.
backgroundTiled * Specifies or retrieves a value indicating whether the background image of the VIEW or SUBVIEW is tiled.
category Specifies or retrieves the category for which the user interface will appear.
focusObjectID Specifies or retrieves a value indicating which element has keyboard focus.
maxHeight Specifies or retrieves the maximum height of the VIEW when resizing.
maxWidth Specifies or retrieves the maximum width of the VIEW when resizing.
minHeight Specifies or retrieves the minimum height of the VIEW when resizing.
minWidth Specifies or retrieves the minimum width of the VIEW when resizing.
resizable Specifies or retrieves a value indicating whether the VIEW can be resized.
resizeBackgroundImage Specifies or retrieves a value indicating whether the background image can be resized.
scriptFile Specifies the file names of accompanying JScript files.
timerInterval Specifies or retrieves the interval, in milliseconds, at which the timer fires events to the ontimer event handler.
title Specifies or retrieves the title of the VIEW. Can only be set at design time.
titleBar Specifies or retrieves a value indicating whether the window title bar is shown.
transparencyColor * Specifies or retrieves the transparency color of the background image.

 

The VIEW element supports the following methods.

Method Description
close Closes the VIEW.
maximize Maximizes the VIEW.
minimize Minimizes the VIEW.
restore Restores the VIEW.
returnToMediaCenter Returns the user to the full mode of Windows Media Player.
size Resizes the VIEW on a specified edge.

 

The VIEW element can implement the following event handlers.

Event handler Description
onclose Handles an event that occurs when the VIEW is about to be closed.
onerror Handles an error event if Settings.enableErrorDialogs is set to false.
onload Handles an event that occurs when the VIEW is first displayed.
ontimer Handles timer events.

 

The VIEW element supports the ambient attributes and can implement the ambient event handlers, except where noted. For more information, see Ambient Attributes and Ambient Event Handlers,

Skin Programming Reference