Class ScreenContextManager
Service to manage the transitions between ScreenContext instances.
Inheritance
ScreenContextManager
  Implements
Inherited Members
Namespace: Evergine.Framework.Services
Assembly: Evergine.Framework.dll
Syntax
public sealed class ScreenContextManager : Service, IDependencyObject
  Constructors
ScreenContextManager()
Initializes a new instance of the ScreenContextManager class.
Declaration
public ScreenContextManager()
  Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | graphics device.  | 
      
| ArgumentNullException | If graphics device is null.  | 
      
Properties
CurrentContext
Gets the current context.
Declaration
public ScreenContext CurrentContext { get; }
  Property Value
| Type | Description | 
|---|---|
| ScreenContext | The current context.  | 
      
Methods
FindContextByName(string)
Finds a context by name.
Declaration
public ScreenContext FindContextByName(string name)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | name | The name.  | 
      
Returns
| Type | Description | 
|---|---|
| ScreenContext | The screen context.  | 
      
OnDestroy()
Destroy this instance.
Declaration
protected override void OnDestroy()
  Overrides
OnLoaded()
Invoked when the object is loaded.
Declaration
protected override void OnLoaded()
  Overrides
Pop(bool)
Pops this instance.
Declaration
public void Pop(bool doDispose = true)
  Parameters
| Type | Name | Description | 
|---|---|---|
| bool | doDispose | If older scenes should be disposed, true by default.  | 
      
Push(ScreenContext)
Pushes the specified next context.
Declaration
public void Push(ScreenContext nextContext)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ScreenContext | nextContext | The next context.  | 
      
To(ScreenContext, bool)
To the specified next context.
Declaration
public void To(ScreenContext nextContext, bool doDispose = true)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ScreenContext | nextContext | The next context.  | 
      
| bool | doDispose | If older scenes should be disposed, true by default.  | 
      
Events
OnActivatingScene
Occurs when a new scene is activated.
Declaration
public event ScreenContextManager.SceneChanged OnActivatingScene
  Event Type
| Type | Description | 
|---|---|
| ScreenContextManager.SceneChanged | 
OnDesactivatingScene
Occurs when a scene is deactivated.
Declaration
public event ScreenContextManager.SceneChanged OnDesactivatingScene
  Event Type
| Type | Description | 
|---|---|
| ScreenContextManager.SceneChanged |