C# Class Baconit.PanelManager

Inheritance: Windows.UI.Xaml.Controls.UserControl, IPanelHost
Show file Open project: QuinnDamerell/Baconit Class Usage Examples

Public Methods

Method Description
CanGoBack ( ) : bool

Indicates if it is possible to go back.

CurrentScreenMode ( ) : ScreenMode

Returns the current screen mode

GoBack ( ) : bool

Fired when the user presses the back button.

Navigate ( Type panelType, string panelId, object>.Dictionary arguments = null ) : bool

Navigates to a panel. If a panel already exist with the same panelId instead or creating a new panel the old panel will be shown and passed the new arguments.

PanelManager ( IMainPage main, IPanel startingPanel = null ) : BaconBackend.Helpers
SetStatusBar ( System.Color color = null, double opacity = 1 ) : Task

Sets the status bar color for mobile.

ToggleFullScreen ( bool goFullScreen ) : void

Enters or exits full screen mode

ToggleMenu ( bool show ) : void

Toggles the main side menu

Private Methods

Method Description
ExecuteOnScreenSizeChagnedLogic ( ScreenMode newMode ) : void

Does the screen size changed logic, must be called under lock.

FireOnCleanupPanel ( IPanel panel ) : void

Fires OnCleanupPanel for the panel

FireOnNavigateComplete ( ) : void

Fires OnNavigationComplete

FireOnNavigateFrom ( IPanel panel ) : void

Fires OnNavigateFrom for the panel

FireOnNavigateTo ( IPanel panel ) : void

Fires OnNavigateTo for the panel

FireOnReduceMemory ( IPanel panel ) : void

Fires OnReduceMemory for the panel

FireOnScreenModeChanged ( ) : void

Fires on screen mode changed.

FireOnSuspendOrResumeEvents ( bool isSuspend ) : void

Fires the events to the correct panels when suspending or resuming.

GetPanelType ( IPanel panel ) : PanelType

Returns the type of panel this is.

GoBack_Internal ( ) : bool?

Navigates back to the previous page

MemoryMan_OnMemoryCleanUpRequest ( object sender, BaconBackend e ) : void

Fired when the memory manager wants some memory back. Lets see if we can help him out.

OnResuming ( object sender, object e ) : void

Fired when the app is resuming.

OnScreenSizeChanged ( int newSize, bool forceSet = false, bool toggleFullScreen = null ) : void
OnSuspending ( object sender, EventArgs e ) : void

Fired when the app is suspending

PanelAnimation_Completed ( object sender, object e ) : void

Fired when the storyboard animation has finished.

PlayFadeAnimation ( PanelType newPanelType, PanelType lastPanelType, State newState ) : void

Fades in our out the current panel

SetStatusBar_Internal ( System.Color color = null, double opacity = 1 ) : Task

Same as the function above, used to work around a bug.

UpdateBackButton ( ) : void

Updates the current state of the back button

UpdatePanelSizes ( ) : void

Updates the panel sizes so they are correct for what's showing. Note, this needs to be called under lock.

Windows_SizeChanged ( object sender, WindowSizeChangedEventArgs e ) : void

Fired when the window size changes.

Method Details

CanGoBack() public method

Indicates if it is possible to go back.
public CanGoBack ( ) : bool
return bool

CurrentScreenMode() public method

Returns the current screen mode
public CurrentScreenMode ( ) : ScreenMode
return ScreenMode

GoBack() public method

Fired when the user presses the back button.
public GoBack ( ) : bool
return bool

Navigate() public method

Navigates to a panel. If a panel already exist with the same panelId instead or creating a new panel the old panel will be shown and passed the new arguments.
public Navigate ( Type panelType, string panelId, object>.Dictionary arguments = null ) : bool
panelType System.Type The type of panel to be created
panelId string A unique identifier for the panel, the id should be able to differeincae between two panels of the same type
arguments object>.Dictionary Arguments to be sent to the panel
return bool

PanelManager() public method

public PanelManager ( IMainPage main, IPanel startingPanel = null ) : BaconBackend.Helpers
main IMainPage
startingPanel IPanel
return BaconBackend.Helpers

SetStatusBar() public method

Sets the status bar color for mobile.
public SetStatusBar ( System.Color color = null, double opacity = 1 ) : Task
color System.Color
opacity double
return Task

ToggleFullScreen() public method

Enters or exits full screen mode
public ToggleFullScreen ( bool goFullScreen ) : void
goFullScreen bool
return void

ToggleMenu() public method

Toggles the main side menu
public ToggleMenu ( bool show ) : void
show bool
return void