Freigeben über


RemoteUserControl Class

Definition

Abstract class from which Remote UI controls should be derived.

public abstract class RemoteUserControl : IDisposable, Microsoft.VisualStudio.RpcContracts.RemoteUI.IRemoteProxiedUserControl2, Microsoft.VisualStudio.RpcContracts.RemoteUI.IRemoteWpfUserControl
type RemoteUserControl = class
    interface IRemoteWpfUserControl
    interface IRemoteProxiedUserControl
    interface IRemoteUserControl
    interface IDisposable
    interface IRemoteProxiedUserControl2
Public MustInherit Class RemoteUserControl
Implements IDisposable, IRemoteProxiedUserControl2, IRemoteWpfUserControl
Inheritance
RemoteUserControl
Implements

Remarks

This class automatically retrieves the xaml for the control from an embedded resource of the same name. E.g., a class named "Foo" which extends RemoteUserControl and is defined in its project default namespace, would automatically retrieve its xaml definition fom an embedded resource named "Foo.xaml" defined in the same project.

Constructors

RemoteUserControl(Object, SynchronizationContext)

Initializes a new instance of the RemoteUserControl class.

RemoteUserControl(Object, VisualStudioExtensibility, SynchronizationContext, TraceSource)

Initializes a new instance of the RemoteUserControl class.

RemoteUserControl(Object)

Initializes a new instance of the RemoteUserControl class.

Properties

DataContext

Gets the data context of the remote control.

ResourceDictionaries

Gets a collection of WPF resource dictionaries as xaml strings. These dictionaries are merged into this control's resources. Strings must be added to this collection during the remote user control's construction.

Methods

ControlLoadedAsync(CancellationToken)

This method is invoked when the control is first loaded.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Dispose(Boolean)

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetXamlAsync(CancellationToken)

This method retrieves the xaml describing the data template of the control.

Explicit Interface Implementations

IRemoteProxiedUserControl.GetObjectAsync(ObjectId, CancellationToken)

This method allows querying for the value of a uniquely identifiable object that is part of the DataContext of the control. The value of the object will be sent to the client using ObjectValueNotificationAsync(MessagePackFragment, CancellationToken).

IRemoteProxiedUserControl.InvokeAsync(ObjectId, MessagePackFragment, CancellationToken)

This method allows invoking ExecuteAsync on an async command that is part of the DataContext of the control.

IRemoteProxiedUserControl.SetCollectionEntryAsync(ObjectId, Int32, MessagePackFragment, Nullable<ObjectVersion>, CancellationToken)

This method updates a property of an IList that is part of the DataContext of the control.

IRemoteProxiedUserControl.SetObjectPropertyAsync(ObjectId, String, MessagePackFragment, CancellationToken)

This method updates a property of an object that is part of the DataContext of the control.

IRemoteProxiedUserControl2.InvokeAsync(ObjectId, MessagePackFragment, IReadOnlyDictionary<String,String>, CancellationToken)

Invokes ExecuteAsync on an async command that is part of the DataContext of the control.

IRemoteWpfUserControl.InitializeAsync(IRemoteProxiedUserControlClient, CancellationToken)

This method retrieves the xaml describing the data template of the control and the corresponding data context.

Applies to