MediaBindingEventArgs MediaBindingEventArgs MediaBindingEventArgs MediaBindingEventArgs Class

Definition

Provides data for the Binding event and methods for binding media content to the associated MediaSource.

public : sealed class MediaBindingEventArgs : IMediaBindingEventArgs, IMediaBindingEventArgs2public sealed class MediaBindingEventArgs : IMediaBindingEventArgs, IMediaBindingEventArgs2Public NotInheritable Class MediaBindingEventArgs Implements IMediaBindingEventArgs, IMediaBindingEventArgs2// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Remarks

Get an instance of this class by handling the Binding event.

Properties

MediaBinder MediaBinder MediaBinder MediaBinder

Gets the MediaBinder associated with the binding event.

public : MediaBinder MediaBinder { get; }public MediaBinder MediaBinder { get; }Public ReadOnly Property MediaBinder As MediaBinder// You can use this property in JavaScript.
Value
MediaBinder MediaBinder MediaBinder MediaBinder

The MediaBinder associated with the binding event.

Remarks

Use the Token property of the MediaBinder to determine what media content should be bound.

Methods

GetDeferral() GetDeferral() GetDeferral() GetDeferral()

Informs the system that the app might continue to perform work after the Binding event handler returns.

public : Deferral GetDeferral()public Deferral GetDeferral()Public Function GetDeferral() As Deferral// You can use this method in JavaScript.
Returns

The requested deferral.

Remarks

Since retrieving and binding the media content may take a significant amount of time, this should typically be performed asynchronously. Requesting a deferral lets the system know that your app is continuing to perform asynchronous work after the Binding event handler has returned. Call the Complete method when your binding operation is finished.

Subscribe to the Canceled event to be alerted by the system if the binding operation should be canceled.

SetAdaptiveMediaSource(AdaptiveMediaSource) SetAdaptiveMediaSource(AdaptiveMediaSource) SetAdaptiveMediaSource(AdaptiveMediaSource) SetAdaptiveMediaSource(AdaptiveMediaSource)

Binds an adaptive media source to the MediaSource associated with the event.

public : void SetAdaptiveMediaSource(AdaptiveMediaSource mediaSource)public void SetAdaptiveMediaSource(AdaptiveMediaSource mediaSource)Public Function SetAdaptiveMediaSource(mediaSource As AdaptiveMediaSource) As void// You can use this method in JavaScript.
Parameters
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

SetStorageFile(IStorageFile) SetStorageFile(IStorageFile) SetStorageFile(IStorageFile) SetStorageFile(IStorageFile)

Binds a storage file to the MediaSource associated with the event.

public : void SetStorageFile(IStorageFile file)public void SetStorageFile(IStorageFile file)Public Function SetStorageFile(file As IStorageFile) As void// You can use this method in JavaScript.
Parameters
file
IStorageFile IStorageFile IStorageFile IStorageFile

The StorageFile containing media content.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

SetStream(IRandomAccessStream, String) SetStream(IRandomAccessStream, String) SetStream(IRandomAccessStream, String) SetStream(IRandomAccessStream, String)

Sets the media content to be bound to the MediaSource.

public : void SetStream(IRandomAccessStream stream, PlatForm::String contentType)public void SetStream(IRandomAccessStream stream, String contentType)Public Function SetStream(stream As IRandomAccessStream, contentType As String) As void// You can use this method in JavaScript.
Parameters
stream
IRandomAccessStream IRandomAccessStream IRandomAccessStream IRandomAccessStream

A stream containing the media content.

contentType
PlatForm::String String String String

A string specifying the content type of the media content.

SetStreamReference(IRandomAccessStreamReference, String) SetStreamReference(IRandomAccessStreamReference, String) SetStreamReference(IRandomAccessStreamReference, String) SetStreamReference(IRandomAccessStreamReference, String)

Binds a media content stream reference to the MediaSource associated with the event.

public : void SetStreamReference(IRandomAccessStreamReference stream, PlatForm::String contentType)public void SetStreamReference(IRandomAccessStreamReference stream, String contentType)Public Function SetStreamReference(stream As IRandomAccessStreamReference, contentType As String) As void// You can use this method in JavaScript.
Parameters
contentType
PlatForm::String String String String

A string specifying the content type of the media content.

See Also

SetUri(Uri) SetUri(Uri) SetUri(Uri) SetUri(Uri)

Sets the URI of the media content to be bound to the MediaSource.

public : void SetUri(Uri uri)public void SetUri(Uri uri)Public Function SetUri(uri As Uri) As void// You can use this method in JavaScript.
Parameters
uri
Uri Uri Uri Uri

The URI of the media content to be bound.

Events

Canceled Canceled Canceled Canceled

Occurs when the binding operation is cancelled.

public : event TypedEventHandler Canceled<MediaBindingEventArgs,  object>public event TypedEventHandler Canceled<MediaBindingEventArgs,  object>Public Event Canceled<MediaBindingEventArgs,  object>// You can use this event in JavaScript.