Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 1.78 KB

mediaelement_currentstate.md

File metadata and controls

33 lines (19 loc) · 1.78 KB
-api-id -api-type
P:Windows.UI.Xaml.Controls.MediaElement.CurrentState
winrt property

Windows.UI.Xaml.Controls.MediaElement.CurrentState

-description

Gets the status of this MediaElement.

-property-value

The current state of this MediaElement. The state can be one of the following (as defined in the MediaElementState enumeration): Buffering, Closed, Opening, Paused, Playing, or Stopped. The default value is Closed.

-remarks

-examples

The following example demonstrates one way to display the CurrentState of a MediaElement. It creates a MediaElement and several buttons for controlling media playback. To display the current state of the MediaElement, the example registers for the CurrentStateChanged event and uses an event handler to update a TextBlock.

[!code-xamlmedia_ovw_controlling_media_with_currentstate]

[!code-csharpmedia_ovw_controlling_media_with_currentstate_code]

[!code-vbmedia_ovw_controlling_media_with_currentstate_code]

-see-also