CanPause Property

Gets a value indicating if media can be paused if the Pause method is called.

XAML
Cannot be used in XAML.
Scripting
value = object.CanPause

Property Value

Boolean

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

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

Remarks

Streaming media cannot be paused. Therefore CanPause returns false for any case where the MediaElement has loaded streaming media.

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

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

Applies To

MediaElement

See Also

Media Overview
Supported Media Formats and Protocols