C# Class WinRTXamlToolkit.Controls.AlternativeFrame

Inheritance: Windows.UI.Xaml.Controls.ContentControl
Mostra file Open project: xyzzer/WinRTXamlToolkit Class Usage Examples

Public Properties

Property Type Description
CacheSizeProperty Windows.UI.Xaml.DependencyProperty
CanGoBackProperty Windows.UI.Xaml.DependencyProperty
CanGoForwardProperty Windows.UI.Xaml.DependencyProperty
CanNavigateProperty Windows.UI.Xaml.DependencyProperty
PagePresenterStyleProperty Windows.UI.Xaml.DependencyProperty
PageTransitionProperty Windows.UI.Xaml.DependencyProperty
ShouldWaitForImagesToLoadProperty DependencyProperty

Public Methods

Method Description
AlternativeFrame ( ) : System

Initializes a new instance of the AlternativeFrame class.

GetNavigationState ( ) : string

Serializes the Frame navigation history into a string.

Serialization is similar to the one used in the matching Frame class method: 1,TotalPages,BackStackDepth[,SourcePageType_Length,SourcePageType,Parameter_TypeCode,Parameter_Length,Parameter…]

GoBackAsync ( ) : Task

Goes back in history back stack.

GoForwardAsync ( ) : Task

Runs the forward transition.

NavigateAsync ( Type sourcePageType ) : Task

Navigates to source page of the specified type.

NavigateAsync ( Type sourcePageType, object parameter ) : Task

Navigates to source page of the specified type.

PreloadAsync ( Type sourcePageType, object parameter ) : Task

Preloads a page of the specified source page type.

Allows to preload a page before user navigates to it, so if it does get navigated to - shows up quickly. If another page gets navigated to - the preloaded page will be released or cached depending on its NavigationCacheMode property.

SetNavigationStateAsync ( string navigationState ) : Task

Reads and restores the navigation history of a Frame from a provided serialization string.

UnloadAllPreloadedAsync ( ) : Task

Unloads all preloaded pages.

Pages might have been preloaded in the anticipation of the user navigating to them, then a state change might invalidate or reduce the possibility of a navigation request and it might be worth unloading the preloaded pages to release resources that they consumed. The preloaded page will be released or cached depending on its NavigationCacheMode property.

UnloadPreloadedAsync ( Type sourcePageType, object parameter ) : Task

Unloads the preloaded page of a given type and parameter.

A page might have been preloaded in the anticipation of the user navigating to it, then a state change might invalidate or reduce the possibility of a navigation request and it might be worth unloading the preloaded page to release resources that it consumed. The preloaded page will be released or cached depending on its NavigationCacheMode property.

Protected Methods

Method Description
OnApplyTemplate ( ) : void

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.

OnPagePresenterStyleChanged ( Style oldPagePresenterStyle, Style newPagePresenterStyle ) : void

Provides derived classes an opportunity to handle changes to the PagePresenterStyle property.

Private Methods

Method Description
AddParameterToNavigationStateString ( System.StringBuilder sb, int typeCode, string valueString ) : void
AppendEntryToNavigationStateString ( System.StringBuilder sb, JournalEntry journalEntry ) : void
NavigateCoreAsync ( Type sourcePageType, object parameter, NavigationMode navigationMode ) : Task
OnCacheSizeChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the CacheSize property.

OnCacheSizeChanged ( int oldCacheSize, int newCacheSize ) : void

Provides derived classes an opportunity to handle changes to the CacheSize property.

OnNavigatedAsync ( AlternativeNavigationEventArgs args ) : System.Threading.Tasks.Task
OnNavigatingAsync ( AlternativeNavigatingCancelEventArgs args ) : System.Threading.Tasks.Task
OnPagePresenterStyleChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the PagePresenterStyle property.

ParseJournalEntry ( string parsedString, int &parseIndex ) : JournalEntry
ParseNumber ( string parsedString, int &parseIndex ) : int
ThrottledGoBackAsync ( ) : Task
ThrottledNavigateAsync ( Type sourcePageType, object parameter ) : Task
TransitionBackwardAsync ( AlternativePage currentPage, AlternativePage newPage, ContentPresenter previousPagePresenter, ContentPresenter newPagePresenter ) : Task
TransitionForwardAsync ( AlternativePage currentPage, AlternativePage newPage, ContentPresenter previousPagePresenter, ContentPresenter newPagePresenter ) : Task
UpdateCans ( ) : void

Method Details

AlternativeFrame() public method

Initializes a new instance of the AlternativeFrame class.
public AlternativeFrame ( ) : System
return System

GetNavigationState() public method

Serializes the Frame navigation history into a string.
Serialization is similar to the one used in the matching Frame class method: 1,TotalPages,BackStackDepth[,SourcePageType_Length,SourcePageType,Parameter_TypeCode,Parameter_Length,Parameter…]
public GetNavigationState ( ) : string
return string

GoBackAsync() public method

Goes back in history back stack.
/// Navigation already in progress. /// or /// GoBack() call failed. CanGoBack is false. /// or /// GoBack() call failed. CanNavigate is false. ///
public GoBackAsync ( ) : Task
return Task

GoForwardAsync() public method

Runs the forward transition.
/// Navigation already in progress. /// or /// GoForward() call failed. CanGoForward is false. /// or /// GoForward() call failed. CanNavigate is false. ///
public GoForwardAsync ( ) : Task
return Task

NavigateAsync() public method

Navigates to source page of the specified type.
public NavigateAsync ( Type sourcePageType ) : Task
sourcePageType System.Type Type of the source page.
return Task

NavigateAsync() public method

Navigates to source page of the specified type.
/// Navigation already in progress. /// or /// Navigate() call failed. CanNavigate is false. ///
public NavigateAsync ( Type sourcePageType, object parameter ) : Task
sourcePageType System.Type Type of the source page.
parameter object The parameter.
return Task

OnApplyTemplate() protected method

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.
protected OnApplyTemplate ( ) : void
return void

OnPagePresenterStyleChanged() protected method

Provides derived classes an opportunity to handle changes to the PagePresenterStyle property.
protected OnPagePresenterStyleChanged ( Style oldPagePresenterStyle, Style newPagePresenterStyle ) : void
oldPagePresenterStyle Windows.UI.Xaml.Style The old PagePresenterStyle value
newPagePresenterStyle Windows.UI.Xaml.Style The new PagePresenterStyle value
return void

PreloadAsync() public method

Preloads a page of the specified source page type.
Allows to preload a page before user navigates to it, so if it does get navigated to - shows up quickly. If another page gets navigated to - the preloaded page will be released or cached depending on its NavigationCacheMode property.
public PreloadAsync ( Type sourcePageType, object parameter ) : Task
sourcePageType System.Type Type of the source page.
parameter object The parameter.
return Task

SetNavigationStateAsync() public method

Reads and restores the navigation history of a Frame from a provided serialization string.
public SetNavigationStateAsync ( string navigationState ) : Task
navigationState string /// The serialization string that supplies the restore point for navigation history. ///
return Task

UnloadAllPreloadedAsync() public method

Unloads all preloaded pages.
Pages might have been preloaded in the anticipation of the user navigating to them, then a state change might invalidate or reduce the possibility of a navigation request and it might be worth unloading the preloaded pages to release resources that they consumed. The preloaded page will be released or cached depending on its NavigationCacheMode property.
public UnloadAllPreloadedAsync ( ) : Task
return Task

UnloadPreloadedAsync() public method

Unloads the preloaded page of a given type and parameter.
A page might have been preloaded in the anticipation of the user navigating to it, then a state change might invalidate or reduce the possibility of a navigation request and it might be worth unloading the preloaded page to release resources that it consumed. The preloaded page will be released or cached depending on its NavigationCacheMode property.
public UnloadPreloadedAsync ( Type sourcePageType, object parameter ) : Task
sourcePageType Type Type of the source page.
parameter object The parameter.
return Task

Property Details

CacheSizeProperty public_oe static_oe property

CacheSize Dependency Property
public static DependencyProperty,Windows.UI.Xaml CacheSizeProperty
return Windows.UI.Xaml.DependencyProperty

CanGoBackProperty public_oe static_oe property

CanGoBack Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanGoBackProperty
return Windows.UI.Xaml.DependencyProperty

CanGoForwardProperty public_oe static_oe property

CanGoForward Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanGoForwardProperty
return Windows.UI.Xaml.DependencyProperty

CanNavigateProperty public_oe static_oe property

CanNavigate Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanNavigateProperty
return Windows.UI.Xaml.DependencyProperty

PagePresenterStyleProperty public_oe static_oe property

PagePresenterStyle Dependency Property
public static DependencyProperty,Windows.UI.Xaml PagePresenterStyleProperty
return Windows.UI.Xaml.DependencyProperty

PageTransitionProperty public_oe static_oe property

PageTransition Dependency Property
public static DependencyProperty,Windows.UI.Xaml PageTransitionProperty
return Windows.UI.Xaml.DependencyProperty

ShouldWaitForImagesToLoadProperty public_oe static_oe property

ShouldWaitForImagesToLoad Dependency Property
public static DependencyProperty ShouldWaitForImagesToLoadProperty
return DependencyProperty