Share via


MediaBindingEventArgs.SetDownloadOperation(DownloadOperation) Method

Definition

Binds a DownloadOperation to the MediaSource associated with the event.

public:
 virtual void SetDownloadOperation(DownloadOperation ^ downloadOperation) = SetDownloadOperation;
void SetDownloadOperation(DownloadOperation const& downloadOperation);
public void SetDownloadOperation(DownloadOperation downloadOperation);
function setDownloadOperation(downloadOperation)
Public Sub SetDownloadOperation (downloadOperation As DownloadOperation)

Parameters

downloadOperation
DownloadOperation

The DownloadOperation to bind to the MediaSource.

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)

Remarks

Use the BackgroundDownloader class to create a DownloadOperation.

You can create a MediaSource directly from a DownloadOperation, without using media binding by calling CreateFromDownloadOperation.

Use the MediaSource.DownloadOperation property to get a reference to the download operation set with this method from the MediaSource.

Applies to