Share via


Windows Media Player 11 SDK Matching the Windows Media Player ColorsĀ 

Windows Media Player SDK banner art

Previous Next

Matching the Windows Media Player Colors

Making your online store Web page match the Windows Media Player color scheme is easy. Simply handle the External.OnColorChange event. To specify a function to handle the event, use code like the following when your Web page loads:

// Set up the color change event.
external.OnColorChange = OnAppColor;

Each time the user changes the color scheme of Windows Media Player, the Player will call your function. The following example shows a simple function that sets the Web page background to match the External.appColorLight property:

// Match the current color.
function OnAppColor()
{
    window.document.bgColor = external.appColorLight;
}

There are other color properties available for your use as well. See External Object for Type 2 Online Stores.

See Also

Previous Next