CanPause

Gets a value that indicates whether media can be paused if the Pause method is called.

value = object.CanPause

Property Value

Type: Boolean

true if the media can be paused; otherwise, false.

This property is read-only. The default value is false.

Managed Equivalent

CanPause

Remarks

Streaming media cannot be paused. Therefore, CanPause returns false for any case where the MediaElement has loaded streaming media. However, a CanPause value of false does not always indicate streaming media. The purpose of this property is to determine whether user capabilities are available at a point in time so that your application can present the appropriate user interface. It is not intended for probing the media itself.

Calling Pause on a MediaElement that has opened and is playing streaming content does not raise an error. Instead, the method call is ignored.

One scenario for this property is to check it after MediaOpened is raised, and potentially change the display characteristics of any Pause button that appears in the user interface if CanPause is false.

Applies To

MediaElement