RemoteUserControl Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| 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. |