Udostępnij za pośrednictwem


MediaPlayerElement.SetMediaPlayer(MediaPlayer) Method

Definition

Sets the MediaPlayer instance used to render media.

public:
 virtual void SetMediaPlayer(MediaPlayer ^ mediaPlayer) = SetMediaPlayer;
void SetMediaPlayer(MediaPlayer const& mediaPlayer);
public void SetMediaPlayer(MediaPlayer mediaPlayer);
function setMediaPlayer(mediaPlayer)
Public Sub SetMediaPlayer (mediaPlayer As MediaPlayer)

Parameters

mediaPlayer
MediaPlayer

The new MediaPlayer instance used to render media.

Remarks

You can use the SetMediaPlayer method to change the underlying MediaPlayer instance. Calling this method to change the MediaPlayer can cause non-trivial side effects because it can change other properties of the MediaPlayerElement.

Use the MediaPlayer property to get the current instance of MediaPlayer.

Applies to