Share via


CastingSource.PreferredSourceUri 屬性

定義

取得或設定要與 DLNA ByRef 搭配使用之內容的替代 URI。

public:
 property Uri ^ PreferredSourceUri { Uri ^ get(); void set(Uri ^ value); };
Uri PreferredSourceUri();

void PreferredSourceUri(Uri value);
public System.Uri PreferredSourceUri { get; set; }
var uri = castingSource.preferredSourceUri;
castingSource.preferredSourceUri = uri;
Public Property PreferredSourceUri As Uri

屬性值

內容的替代 URI。

範例

#include <winrt/Windows.Media.Casting.h>
...
Windows::UI::Xaml::Controls::MediaElement video;
video.Source(Windows::Foundation::Uri{ L"http://www.contoso.com/videos/video.mp4" });
video.GetAsCastingSource().PreferredSourceUri(Windows::Foundation::Uri{ L"http://www.contoso.com/catalogid=1234" });

適用於