C# Class WinRTXamlToolkit.Controls.AlternativeFrame

Inheritance: Windows.UI.Xaml.Controls.ContentControl
Afficher le fichier Open project: xyzzer/WinRTXamlToolkit Class Usage Examples

Méthodes publiques

Свойство 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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

Initializes a new instance of the AlternativeFrame class.
public AlternativeFrame ( ) : System
Résultat System

GetNavigationState() public méthode

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
Résultat string

GoBackAsync() public méthode

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
Résultat Task

GoForwardAsync() public méthode

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
Résultat Task

NavigateAsync() public méthode

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

NavigateAsync() public méthode

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.
Résultat Task

OnApplyTemplate() protected méthode

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
Résultat void

OnPagePresenterStyleChanged() protected méthode

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
Résultat void

PreloadAsync() public méthode

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.
Résultat Task

SetNavigationStateAsync() public méthode

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. ///
Résultat Task

UnloadAllPreloadedAsync() public méthode

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
Résultat Task

UnloadPreloadedAsync() public méthode

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.
Résultat Task

Property Details

CacheSizeProperty public_oe static_oe property

CacheSize Dependency Property
public static DependencyProperty,Windows.UI.Xaml CacheSizeProperty
Résultat Windows.UI.Xaml.DependencyProperty

CanGoBackProperty public_oe static_oe property

CanGoBack Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanGoBackProperty
Résultat Windows.UI.Xaml.DependencyProperty

CanGoForwardProperty public_oe static_oe property

CanGoForward Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanGoForwardProperty
Résultat Windows.UI.Xaml.DependencyProperty

CanNavigateProperty public_oe static_oe property

CanNavigate Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanNavigateProperty
Résultat Windows.UI.Xaml.DependencyProperty

PagePresenterStyleProperty public_oe static_oe property

PagePresenterStyle Dependency Property
public static DependencyProperty,Windows.UI.Xaml PagePresenterStyleProperty
Résultat Windows.UI.Xaml.DependencyProperty

PageTransitionProperty public_oe static_oe property

PageTransition Dependency Property
public static DependencyProperty,Windows.UI.Xaml PageTransitionProperty
Résultat Windows.UI.Xaml.DependencyProperty

ShouldWaitForImagesToLoadProperty public_oe static_oe property

ShouldWaitForImagesToLoad Dependency Property
public static DependencyProperty ShouldWaitForImagesToLoadProperty
Résultat DependencyProperty