次の方法で共有


Ambient Event Handlers

[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 following event handlers can be implemented for most skin elements. The ambient event attributes accessed with the event keyword can be used within an event handler to determine the state of the keyboard and mouse at the time of the event.

Event handler Description
attribute_onchange When a skin attribute changes value, an event occurs that can be handled by an event handler. The name of the event handler is the name of the attribute followed by an underscore and "onchange", such as "value_onchange".
onblur Handles an event that occurs when the element loses the keyboard focus.
onclick Handles an event that occurs when the user clicks the element.
ondblclick Handles an event that occurs when the user double-clicks the element.
onendalphablend Handles an event that occurs when an element completes an alphaBlendTo operation.
onendmove Handles an event that occurs when an element completes a moveTo operation.
onfocus Handles an event that occurs when the element receives the keyboard focus.
onkeydown Handles an event that occurs when a key is pressed.
onkeypress Handles an event that occurs when the user presses an alphanumeric key.
onkeyup Handles an event that occurs when a key is released.
onmousedown Handles an event that occurs when the user clicks a mouse button.
onmousemove Handles an event that occurs when the user moves the mouse pointer while it is over an element.
onmouseout Handles an event that occurs when the user moves the pointer off the element.
onmouseover Handles an event that occurs when the user first places the pointer over the element.
onmouseup Handles an event that occurs when the user releases a mouse button while the pointer is over the element.
onresize Handles an event that occurs when a control resizes.

 

Ambient Event Attributes

Skin Programming Reference