Share via


UIElement.MediaCommand Event

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Occurs when a button is pressed on a remote control.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Event MediaCommand As MediaCommandEventHandler
public event MediaCommandEventHandler MediaCommand

Remarks

The button pressed is identified by the MediaCommand property of the related MediaCommandEventArgs. The command is identified using a value from the MediaCommand enumeration. Members of this enumeration correlate with the buttons available on the most common remote controls. Some of these commands are device specific. See the Version Notes section for more information.

Version Notes

Silverlight for Xbox

MediaCommand events identified by the following values occur on Silverlight for Xbox only

Version Information

Silverlight

Supported in: 5

Platforms

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