Class ViewUserControl
The base implementation of a WPF ViewUserControl that has been extended to provide direct access to visual studio for code factory integration.
Inheritance
Implements
Inherited Members
Namespace: CodeFactory.WinVs.Wpf
Assembly: CodeFactory.WinVs.Wpf.dll
Syntax
public class ViewUserControl : UserControl, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IView
Constructors
ViewUserControl()
Default constructor only to be used for compatibility with the visual editor.
Declaration
public ViewUserControl()
ViewUserControl(IVsActions, ILogger)
Initializes the base implementation of a
Declaration
public ViewUserControl(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
TitleProperty
Backing store for the dependance property Title
Declaration
public static readonly DependencyProperty TitleProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
_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 |
Properties
Title
The title that will be assigned to windows that host this user control.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Close()
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
CloseHost
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 |