Class VsUserControl
The base implementation of a WPF UserControl that has been extended to provide direct access to visual studio for code factory integration.
Inheritance
Implements
Inherited Members
Namespace: CodeFactory.VisualStudio.UI
Assembly: CodeFactory.VisualStudio.dll
Syntax
public class VsUserControl : UserControl, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild
Constructors
| Improve this Doc View SourceVsUserControl()
Default constructor only to be used for compatibility with the visual editor.
Declaration
public VsUserControl()
VsUserControl(IVsActions, ILogger)
Initializes the base implementation of a VsUserControl user control.
Declaration
public VsUserControl(IVsActions actions, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
IVsActions | actions | The visual studio actions accessible in this user control. |
ILogger | logger | The logger for interaction inside this user control. |
Fields
| Improve this Doc View Source_logger
Logger class that is assigned to this user control.
Declaration
protected readonly ILogger _logger
Field Value
Type | Description |
---|---|
ILogger |
_visualStudioActions
The visual studio actions provided by code factory for use with visual studio.
Declaration
protected readonly IVsActions _visualStudioActions
Field Value
Type | Description |
---|---|
IVsActions |
WindowTitleProperty
Backing store for the dependance property WindowTitle
Declaration
public static readonly DependencyProperty WindowTitleProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceWindowTitle
The title that will be assigned to windows that host this user control.
Declaration
public string WindowTitle { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Improve this Doc View SourceClose()
Triggers the CloseHost event that will inform the host of this user control to close.
Declaration
protected void Close()
ReleaseSubscriptionToHostWindow(Window)
Used by the code factory to release subscriptions to the host windows events. This is for internal code factory use only.
Declaration
public void ReleaseSubscriptionToHostWindow(Window host)
Parameters
Type | Name | Description |
---|---|---|
Window | host | The hosting window to release subscriptions. |
SubscribeToHostWindow(Window)
Used by the code factory to subscribe to the hosts windows events to be made available to this user control. This is for internal code factory use only.
Declaration
public void SubscribeToHostWindow(Window host)
Parameters
Type | Name | Description |
---|---|---|
Window | host | The hosting window that will display this user control implementation. |
WindowActivated(object, EventArgs)
Event handler when the Activated is raised to this user control.
Declaration
public virtual void WindowActivated(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
object | sender | Source window that has been activated. |
EventArgs | e | Args from the window. |
WindowClosing(object, CancelEventArgs)
Event handler when the Closing is raised to this user control.
Declaration
public virtual void WindowClosing(object sender, CancelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
object | sender | |
CancelEventArgs | e |
Events
| Improve this Doc View SourceCloseHost
Event that is raised when the user control informs the hosting window or control in visual studio to close.
Declaration
public event EventHandler CloseHost
Event Type
Type | Description |
---|---|
EventHandler |