Show / Hide Table of Contents

Class TabItemViewModel<T>

Base class for view models that want to be hosted in a tabbed UI.

Inheritance
System.Object
ViewModelBase<T>
TabItemViewModel<T>
DeploymentViewModel
LaunchViewModel
DVRViewModel
HydraViewModel
InputViewModel
PolarisViewModel
ScreenshotViewModel
ThemeTestingViewModel
TiresiasViewModel
UserManagementViewModel
Implements
IViewProvider
IClosingNotification
IViewInitialize
Inherited Members
ViewModelBase<T>.Closed
ViewModelBase<T>.IsClosable
ViewModelBase<T>.IsDockable
ViewModelBase<T>.HeaderName
ViewModelBase<T>.View
ViewModelBase<T>.IViewProvider.View
ViewModelBase<T>.EventAggregator
ViewModelBase<T>.Logger
ViewModelBase<T>.Closing(CancelEventArgs)
ViewModelBase<T>.IViewInitialize.Initialize()
ViewModelBase<T>.IViewInitialize.Uninitialize()
ViewModelBase<T>.IClosingNotification.Closed(EventArgs)
ViewModelBase<T>.OnClosing(CancelEventArgs)
ViewModelBase<T>.OnClosed()
ViewModelBase<T>.Initialize()
ViewModelBase<T>.Uninitialize()
ViewModelBase<T>.CloseView()
Namespace: Phoenix.Views
Assembly: Phoenix.Abstractions.Views.dll
Syntax
public abstract class TabItemViewModel<T> : ViewModelBase<T>, IViewProvider, IClosingNotification, IViewInitialize where T : TabItemControl
Type Parameters
Name Description
T

The type of the View this model is for.

Constructors

View Source

TabItemViewModel(T, IWindowingControl, IEventAggregator, IPhoenixLogger, IServiceProvider)

Initializes a new instance of the TabItemViewModel<T> class.

Declaration
protected TabItemViewModel(T view, IWindowingControl windowingControl, IEventAggregator eventAggregator, IPhoenixLogger logger, IServiceProvider services = null)
Parameters
Type Name Description
T view

The view this view model is driving.

IWindowingControl windowingControl

The windowing control.

IEventAggregator eventAggregator

The event aggregator for the application.

IPhoenixLogger logger

The logger for the application.

System.IServiceProvider services

The services for the tab.

View Source

TabItemViewModel(T, String, IWindowingControl, IEventAggregator, IPhoenixLogger, IServiceProvider)

Initializes a new instance of the TabItemViewModel<T> class.

Declaration
protected TabItemViewModel(T view, string headerName, IWindowingControl windowingControl, IEventAggregator eventAggregator, IPhoenixLogger logger, IServiceProvider services = null)
Parameters
Type Name Description
T view

The view this view model is driving.

System.String headerName

The name of the view for display in the window manager.

IWindowingControl windowingControl
IEventAggregator eventAggregator

The event aggregator for the application.

IPhoenixLogger logger

The logger for the application.

System.IServiceProvider services

The services for the tab.

Methods

View Source

FocusView()

Focuses the current view tab control.

Declaration
protected virtual void FocusView()
View Source

LogCriticalExceptionOnlyIfTabActive(String, Exception)

Logs an exception object to the logger if the tab is selected or undocked as a Critical severity.

Declaration
protected void LogCriticalExceptionOnlyIfTabActive(string prefix, Exception exception)
Parameters
Type Name Description
System.String prefix

The prefix for this exception.

System.Exception exception

The exception to log.

View Source

LogExceptionOnlyIfTabActive(String, LogSeverity, Exception)

Logs an exception object to the logger if the tab is selected or undocked.

Declaration
protected void LogExceptionOnlyIfTabActive(string prefix, LogSeverity severity, Exception exception)
Parameters
Type Name Description
System.String prefix

The prefix for this exception.

LogSeverity severity

The severity level of the exception.

System.Exception exception

The exception to log.

View Source

LoglineOnlyIfTabActive(String, LogSeverity, String, Object[])

Logs data to the logger if the tab is selected or undocked and includes a line break at the end.

Declaration
protected void LoglineOnlyIfTabActive(string prefix, LogSeverity severity, string entry, params object[] parameters)
Parameters
Type Name Description
System.String prefix

The prefix to use.

LogSeverity severity

The severity level of this entry.

System.String entry

The log entry to write out.

System.Object[] parameters

Formatting parameters to use with the log entry.

View Source

LoglineOnlyIfTabActive(String, Guid, LogSeverity, String, Object[])

Logs data to the logger if the tab is selected or undocked and includes a line break at the end.

Declaration
protected void LoglineOnlyIfTabActive(string prefix, Guid categoryId, LogSeverity severity, string entry, params object[] parameters)
Parameters
Type Name Description
System.String prefix

The prefix to use.

System.Guid categoryId

The id of the category to log to.

LogSeverity severity

The severity level of this entry.

System.String entry

The log entry to write out.

System.Object[] parameters

Formatting parameters to use with the log entry.

View Source

LoglineOnlyIfTabActive(String, Guid, String, Object[])

Logs data to the logger if the tab is selected or undocked and includes a line break at the end.

Declaration
protected void LoglineOnlyIfTabActive(string prefix, Guid categoryId, string entry, params object[] parameters)
Parameters
Type Name Description
System.String prefix

The prefix to use.

System.Guid categoryId

The id of the category to log to.

System.String entry

The log entry to write out.

System.Object[] parameters

Formatting parameters to use with the log entry.

View Source

LoglineOnlyIfTabActive(String, String, Object[])

Logs data to the logger if the tab is selected or undocked and includes a line break at the end.

Declaration
protected void LoglineOnlyIfTabActive(string prefix, string entry, params object[] parameters)
Parameters
Type Name Description
System.String prefix

The prefix to use.

System.String entry

The log entry to write out.

System.Object[] parameters

Formatting parameters to use with the log entry.

View Source

LogOnlyIfTabActive(String, LogSeverity, String, Object[])

Logs data to the logger if the tab is selected or undocked.

Declaration
protected void LogOnlyIfTabActive(string prefix, LogSeverity severity, string entry, params object[] parameters)
Parameters
Type Name Description
System.String prefix

The prefix to use.

LogSeverity severity

The severity level of this entry.

System.String entry

The log entry to write out.

System.Object[] parameters

Formatting parameters to use with the log entry.

View Source

LogOnlyIfTabActive(String, Guid, LogSeverity, String, Object[])

Logs data to the logger if the tab is selected or undocked.

Declaration
protected void LogOnlyIfTabActive(string prefix, Guid categoryId, LogSeverity severity, string entry, params object[] parameters)
Parameters
Type Name Description
System.String prefix

The prefix to use.

System.Guid categoryId

The id of the category to log to.

LogSeverity severity

The severity level of this entry.

System.String entry

The log entry to write out.

System.Object[] parameters

Formatting parameters to use with the log entry.

View Source

LogOnlyIfTabActive(String, Guid, String, Object[])

Logs data to the logger if the tab is selected or undocked.

Declaration
protected void LogOnlyIfTabActive(string prefix, Guid categoryId, string entry, params object[] parameters)
Parameters
Type Name Description
System.String prefix

The prefix to use.

System.Guid categoryId

The id of the category to log to.

System.String entry

The log entry to write out.

System.Object[] parameters

Formatting parameters to use with the log entry.

View Source

LogOnlyIfTabActive(String, String, Object[])

Logs data to the logger if the tab is selected or undocked.

Declaration
protected void LogOnlyIfTabActive(string prefix, string entry, params object[] parameters)
Parameters
Type Name Description
System.String prefix

The prefix to use.

System.String entry

The log entry to write out.

System.Object[] parameters

Formatting parameters to use with the log entry.

View Source

OnViewChanged(Object, DependencyPropertyChangedEventArgs)

Updates the logger with the active tabs.

Declaration
protected virtual void OnViewChanged(object sender, DependencyPropertyChangedEventArgs e)
Parameters
Type Name Description
System.Object sender

The tab being updated.

System.Windows.DependencyPropertyChangedEventArgs e

The tab's status (whether or not it is visible).

Implements

IViewProvider
IClosingNotification
IViewInitialize
  • View Source
In This Article
Back to top Generated by DocFX