IRemoteWpfUserControl.InitializeAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
這個方法會擷取 xaml,描述控件的數據範本和對應的數據內容。
public System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.RemoteUI.RemoteWpfUserControlDefinition> InitializeAsync(Microsoft.VisualStudio.RpcContracts.RemoteUI.IRemoteProxiedUserControlClient remoteUserControlClient, System.Threading.CancellationToken cancellationToken);
abstract member InitializeAsync : Microsoft.VisualStudio.RpcContracts.RemoteUI.IRemoteProxiedUserControlClient * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.RemoteUI.RemoteWpfUserControlDefinition>
Public Function InitializeAsync (remoteUserControlClient As IRemoteProxiedUserControlClient, cancellationToken As CancellationToken) As Task(Of RemoteWpfUserControlDefinition)
參數
- remoteUserControlClient
- IRemoteProxiedUserControlClient
物件,將接收控件 datacontext 變更的通知。
The class implementing <xref data-throw-if-not-resolved="true" uid="Microsoft.VisualStudio.RpcContracts.RemoteUI.IRemoteProxiedUserControl"></xref> is responsible for disposing of
<code data-dev-comment-type="paramref">remoteUserControlClient</code> when <xref data-throw-if-not-resolved="true" uid="System.IDisposable.Dispose"></xref> is invoked on the
<xref data-throw-if-not-resolved="true" uid="Microsoft.VisualStudio.RpcContracts.RemoteUI.IRemoteProxiedUserControl"></xref> instance.
- cancellationToken
- CancellationToken
異步呼叫的取消標記。
傳回
描述數據範本的 xaml 字串。