Show / Hide Table of Contents

Class ViewProviderCollection

Implementation of the IViewProviderCollection service used to register UI view providers with the application.

Inheritance
System.Object
ViewProviderCollection
Implements
IViewProviderCollection
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.WindowManagement
Assembly: Phoenix.Core.dll
Syntax
public class ViewProviderCollection : IViewProviderCollection
Remarks

The AddPhoenixView<TIUniqueViewProvider, TViewProvider, TView>(ViewProviderInfo) that takes in a ViewProviderInfo directly is only used to register system UI (Logging, Device manager) This class is primarily used by the IWindowManager.

Constructors

View Source

ViewProviderCollection()

Initializes a new instance of the ViewProviderCollection class.

Declaration
public ViewProviderCollection()
View Source

ViewProviderCollection(IServiceCollection)

Initializes a new instance of the ViewProviderCollection class.

Declaration
public ViewProviderCollection(IServiceCollection serviceCollection)
Parameters
Type Name Description
IServiceCollection serviceCollection

The to add view services to.

Properties

View Source

RequiredViewProviders

Gets the view providers that are required for phoenix and should never be closed.

Declaration
public IEnumerable<ViewProviderInfo> RequiredViewProviders { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ViewProviderInfo>
View Source

TabViewProviders

Gets the view providers for views that are opened in the main phoenix tab control.

Declaration
public IEnumerable<ViewProviderInfo> TabViewProviders { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ViewProviderInfo>

Methods

View Source

AddDockableTabView<TIUniqueViewProvider, TViewProvider, TView>(String)

Adds a view, that is dockable in the main phoenix tab control, with transient lifetime to the view provider collection.

Declaration
public IViewProviderCollection AddDockableTabView<TIUniqueViewProvider, TViewProvider, TView>(string menuName)
    where TIUniqueViewProvider : class, IViewProvider where TViewProvider : class, TIUniqueViewProvider where TView : FrameworkElement
Parameters
Type Name Description
System.String menuName

The menu name for the tab.

Returns
Type Description
IViewProviderCollection

The view provider collection.

Type Parameters
Name Description
TIUniqueViewProvider

The type of the unique interface for the view provider.

TViewProvider

The implementation of the provider.

TView

The type of the view.

View Source

AddPhoenixView<TIUniqueViewProvider, TViewProvider, TView>(ViewProviderInfo)

Adds a built-in phoenix view with transient lifetime to the view provider collection.

Declaration
public void AddPhoenixView<TIUniqueViewProvider, TViewProvider, TView>(ViewProviderInfo vpInfo)
    where TIUniqueViewProvider : class, IViewProvider where TViewProvider : class, TIUniqueViewProvider where TView : FrameworkElement
Parameters
Type Name Description
ViewProviderInfo vpInfo

The provider info for the view.

Type Parameters
Name Description
TIUniqueViewProvider

The type of the unique interface for the view provider.

TViewProvider

The implementation of the provider.

TView

The type of the view.

View Source

AddView<TViewModel, TView>()

Adds a view with transient lifetime to the view provider collection.

Declaration
public IViewProviderCollection AddView<TViewModel, TView>()
    where TViewModel : class where TView : FrameworkElement
Returns
Type Description
IViewProviderCollection

The view provider collection.

Type Parameters
Name Description
TViewModel

The type of the viewmodel.

TView

The type of the view.

View Source

IsRequired(String)

Gets whether the contract name is for a required view provider.

Declaration
public bool IsRequired(string contractName)
Parameters
Type Name Description
System.String contractName

The contract name for the view provider to check.

Returns
Type Description
System.Boolean

true if the contract name is for a required view provider; otherwise, false.

View Source

TryGetProvider(String, out ViewProviderInfo)

Gets the ViewProviderInfo associated with the specified contract name.

Declaration
public bool TryGetProvider(string contractName, out ViewProviderInfo info)
Parameters
Type Name Description
System.String contractName

The contract name of the ViewProviderInfo to get.

ViewProviderInfo info

When this method returns, contains the ViewProviderInfo associated with the specified key, if the key is found; otherwise, null.

Returns
Type Description
System.Boolean

true if the ViewProviderCollection contains a ViewProviderInfo with the specified contract name; otherwise, false.

Implements

IViewProviderCollection
  • View Source
In This Article
Back to top Generated by DocFX