PlayToReceiver.StartAsync 方法

定义

开始接收“播放到”命令。

public:
 virtual IAsyncAction ^ StartAsync() = StartAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction StartAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction StartAsync();
function startAsync()
Public Function StartAsync () As IAsyncAction

返回

启动操作完成后调用的异步处理程序。

属性

注解

有关创建软件“播放到”接收器的示例,请参阅 媒体强制转换

// Advertise the receiver on the local network and start receiving commands
await receiver.StartAsync();

// Prevent the screen from locking
if (display == null)
    display = new Windows.System.Display.DisplayRequest();
display.RequestActive();

StatusTextBlock.Text = "'" + receiver.FriendlyName + "' started.";
' Advertise the receiver on the local network and start receiving commands
Await receiver.StartAsync()

' Prevent the screen from locking
If display Is Nothing Then
    display = New Windows.System.Display.DisplayRequest()
    display.RequestActive()

    StatusTextBlock.Text = "'" & receiver.FriendlyName & "' started."
End If

适用于

另请参阅