MediaState Enum

Definition

Specifies the states that can be applied to a MediaElement for the LoadedBehavior and UnloadedBehavior properties.

C#
public enum MediaState
Inheritance
MediaState

Fields

Name Value Description
Manual 0

The state used to control a MediaElement manually. Interactive methods like Play() and Pause() can be used. Media will preroll but not play when the MediaElement is assigned valid media source.

Play 1

The state used to play the media. . Media will preroll automatically being playback when the MediaElement is assigned valid media source.

Close 2

The state used to close the media. All media resources are released (including video memory).

Pause 3

The state used to pause the media. Media will preroll but remains paused when the MediaElement is assigned valid media source.

Stop 4

The state used to stop the media. Media will preroll but not play when the MediaElement is assigned valid media source. Media resources are not released.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9