Class WindowManager
Inheritance
Inherited Members
Namespace: Phoenix.WindowManagement
Assembly: Phoenix.Core.dll
Syntax
public class WindowManager : IWindowManager, IWindowingControl
Constructors
View SourceWindowManager(IPhoenixShell, IServiceProvider, ISettingsManager, IPhoenixLogger)
Declaration
public WindowManager(IPhoenixShell shell, IServiceProvider serviceProvider, ISettingsManager settingsManager, IPhoenixLogger logger)
Parameters
Type | Name | Description |
---|---|---|
IPhoenixShell | shell | |
System.IServiceProvider | serviceProvider | |
ISettingsManager | settingsManager | |
IPhoenixLogger | logger |
Properties
View SourceAutoFocusActivatedTabs
Gets a value indicating whether the user is allowing tabs to auto-focus.
Declaration
public bool AutoFocusActivatedTabs { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CloseView
Gets the delegate command for closing a view.
Declaration
public DelegateCommand<string> CloseView { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.String> |
DockView
Gets the delegate command for docking a view.
Declaration
public DelegateCommand<string> DockView { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.String> |
Shell
Gets the shell being used by this manager.
Declaration
public IPhoenixShell Shell { get; }
Property Value
Type | Description |
---|---|
IPhoenixShell |
TabProviderModels
Gets all the models for the tab providers keyed by their contract names.
Declaration
public ImmutableDictionary<string, TabProviderModel> TabProviderModels { get; }
Property Value
Type | Description |
---|---|
System.Collections.Immutable.ImmutableDictionary<System.String, TabProviderModel> |
ToolWindowsByContract
Gets all the undocked tool windows keyed by their contract names.
Declaration
public Dictionary<string, UndockedTabWindow> ToolWindowsByContract { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, UndockedTabWindow> |
UndockView
Gets the delegate command for undocking a view.
Declaration
public DelegateCommand<string> UndockView { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.String> |
ViewContractNames
Gets all the currently loaded tab view contract names.
Declaration
public IEnumerable<string> ViewContractNames { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
WindowingControl
Declaration
public IWindowingControl WindowingControl { get; }
Property Value
Type | Description |
---|---|
IWindowingControl |
Methods
View SourceCloseViewWithContract(String)
Closes a view if it is open.
Declaration
public void CloseViewWithContract(string contractName)
Parameters
Type | Name | Description |
---|---|---|
System.String | contractName | The contract name of the view to close. |
ComposeUI(ViewProviderCollection)
Catalogs the view providers and opens the views on startup.
Declaration
public void ComposeUI(ViewProviderCollection providerCollection)
Parameters
Type | Name | Description |
---|---|---|
ViewProviderCollection | providerCollection | The ViewProviderCollection containing the views. |
FocusViewWithName(String)
Focuses the tab control to a specific view based on HeaderName.
Declaration
public void FocusViewWithName(string headerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | headerName | HeaderName to focus the control to. |
GetUndockedView(String)
Attempts to get the view if undocked. Returns null if this view isn't undocked.
Declaration
public Window GetUndockedView(string viewHeaderName)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewHeaderName | The name of the view to check. |
Returns
Type | Description |
---|---|
System.Windows.Window | Window. |
IsViewDocked(String)
Determines if the provided view is actually docked.
Declaration
public bool IsViewDocked(string view)
Parameters
Type | Name | Description |
---|---|---|
System.String | view | The name of the view to check. |
Returns
Type | Description |
---|---|
System.Boolean | bool. |
MoveViewToViewIndex(String, Int32)
Moves the view to a new index in the tab control.
Declaration
public void MoveViewToViewIndex(string moveView, int newIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | moveView | The name of the view to move. |
System.Int32 | newIndex | The new index to move the view to. |
MoveViewToViewIndex(String, String)
Swaps the two views index in the tab control.
Declaration
public void MoveViewToViewIndex(string moveView, string secondView)
Parameters
Type | Name | Description |
---|---|---|
System.String | moveView | The name of the view to move. |
System.String | secondView | The contract name of view to move to and shuffle. |
NotifyForceExit()
Forces the window manager to call the Closed event.
Declaration
public void NotifyForceExit()
Remarks
This is only meant to be called from the shell when an unhandled exception happens and we need to exit quickly and call the close event.
OpenViewWithContract(String)
Opens a view with the specific name.
Declaration
public void OpenViewWithContract(string contractName)
Parameters
Type | Name | Description |
---|---|---|
System.String | contractName | The name of the view to open. |
RegisterForCloseNotification(IClosingNotification)
Registers an object to be notified of Phoenix closing.
Declaration
public void RegisterForCloseNotification(IClosingNotification closingNotification)
Parameters
Type | Name | Description |
---|---|---|
IClosingNotification | closingNotification | The object to register with the window manager for close notification. |
SaveDevicePanelSettings(Boolean, Double)
Saves device panel width and collapsible state to window settings.
Declaration
public void SaveDevicePanelSettings(bool isCollapsed, double panelWidth)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isCollapsed | The collapsible state of the device panel. |
System.Double | panelWidth | The width of the device panel. |
SaveOutputPanelSettings(Boolean, Double)
Saves output panel height and collapsible state to window settings.
Declaration
public void SaveOutputPanelSettings(bool isCollapsed, double panelHeight)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isCollapsed | The collapsible state of the output panel. |
System.Double | panelHeight | The height of the output panel. |
ToggleViewInteractionState(String, Boolean)
Toggles the state of view interactions. This will either disable or enable any interactions with the view to include keyboard or mouse focus.
Declaration
public void ToggleViewInteractionState(string viewHeaderName, bool shouldEnable)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewHeaderName | Name of the view header. |
System.Boolean | shouldEnable | Flag to determine whether the view interactions should be enabled or not. |