Windows.UI.Xaml.Controls.MediaElement.CurrentState
September 14, 2021 ยท View on GitHub
-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]