Share via


MediaPlayer.SetFileSource(IStorageFile) 方法

定義

將媒體來源設定為檔案。

注意

MediaPlayer.SetFileSource可能會在Windows 10之後變更或無法使用。 請改用 MediaPlayer.Source

public:
 virtual void SetFileSource(IStorageFile ^ file) = SetFileSource;
void SetFileSource(IStorageFile const& file);
/// [Windows.Foundation.Metadata.Deprecated("Use Source instead of SetFileSource.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.Foundation.UniversalApiContract")]
void SetFileSource(IStorageFile const& file);
public void SetFileSource(IStorageFile file);
[Windows.Foundation.Metadata.Deprecated("Use Source instead of SetFileSource.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.Foundation.UniversalApiContract")]
public void SetFileSource(IStorageFile file);
function setFileSource(file)
Public Sub SetFileSource (file As IStorageFile)

參數

file
IStorageFile

媒體來源檔案。

屬性

適用於