Partilhar via


CanSeek

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a value that indicates whether media can be repositioned by setting the value of the Position property.

value = object.CanSeek

Property Value

Type: Boolean

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

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

Managed Equivalent

CanSeek

Remarks

Live streaming media cannot be paused. Therefore, CanSeek returns false for any case where the MediaElement has loaded live streaming media. However, a CanSeek value of false does not always indicate streaming media. The purpose of this property is to indicate 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.

Setting Position 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 Scrub control that appears in the user interface if CanSeek is false.

Applies To

MediaElement