THEME 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 THEME element is the parent-level element of a skin, and contains one or more VIEW elements, which in turn contain all other elements within a skin. Within script code, the THEME element is accessed through the theme global attribute rather than through a name specified by an id attribute, which is not supported by the THEME element.

The THEME element supports the following attributes.

Attribute Description
author Specifies or retrieves the name of the author of the skin.
authorVersion Specifies or retrieves the version number of the skin as assigned by the author.
copyright Specifies or retrieves the copyright string for the skin.
currentViewID Specifies or retrieves the currently displayed VIEW.
title Specifies or retrieves the title of the skin.
version Specifies or retrieves the Windows Media Player version number for which the skin was authored. Can only be set at design time.

 

The THEME element supports the following methods.

Method Description
closeView Closes an open VIEW.
loadPreference Loads a preference from the registry.
logString Logs a user-defined string to the error file, if logging is enabled.
openDialog Opens a file dialog box.
openView Opens a VIEW in a new window.
openViewRelative Opens a VIEW in a new window at a specified initial position relative to the upper-left corner of the skin.
playSound Plays the specified sound file.
savePreference Saves a preference in the registry.
showErrorDialog Displays the standard error dialog box.

 

The THEME element does not support event handlers.

Skin Programming Reference