C# Class PhotoSharingApp.Universal.Facades.NavigationFacade

Encapsulates page navigation.
Inheritance: INavigationFacade
Mostrar archivo Open project: Microsoft/Appsample-Photosharing

Public Methods

Method Description
AddType ( Type view, Type viewModel ) : void

Adds the specified types to the association list.

GoBack ( int steps = 1 ) : void

Goes back in the navigation stack for the specified number of steps.

NavigateToAboutView ( ) : void

Navigates to the about view.

NavigateToCameraView ( ) : void

Navigates to the camera view.

NavigateToCameraView ( CategoryPreview category ) : void

Navigates to the camera view.

NavigateToCategoriesView ( ) : void

Navigates to the categories view.

NavigateToCropView ( StorageFile file ) : void

Navigates to the crop view.

NavigateToCropView ( StorageFile file, CategoryPreview category ) : void

Navigates to the crop view.

NavigateToPhotoDetailsView ( CategoryPreview category, Photo photo ) : void

Navigates to the photo details view.

NavigateToPhotoDetailsView ( Photo photo ) : void

Navigates to the photo details view.

NavigateToPhotoDetailsView ( string photoId ) : void

Navigates to the photo details view.

NavigateToPhotoStream ( Category category ) : void

Navigates to the photo stream view.

NavigateToPhotoStream ( CategoryPreview category ) : void

Navigates to the photo stream view.

NavigateToPhotoStream ( CategoryPreview categoryPreview, PhotoThumbnail photoThumbnail ) : void

Navigates to the photo stream view.

NavigateToProfileView ( ) : void

Navigates to the signed-in user's profile view.

NavigateToProfileView ( User user ) : void

Navigates to the given user's profile view.

NavigateToSignInView ( ) : void

Navigates to the sign-in view.

NavigateToUploadView ( Photo photo, Category category ) : void

Navigates to the upload view to update data of the existing photo.

NavigateToUploadView ( WriteableBitmap image, CategoryPreview category ) : void

Navigates to the upload view.

NavigateToWelcomeView ( ) : void

Navigates to the Welcome View page.

RemoveBackStackFrames ( int numberOfFrames ) : void

Displays a dialog that lets the user pick a category. Removes the specified number of frames from the back stack.

RemoveUploadPhotoFramesFromBackStack ( string categoryIdNavigatedTo ) : void

Removes the frames associated with uploading a photo from the back stack.

ShowCategoryChooserDialog ( ) : Task

Displays a dialog that lets the user pick a category.

ShowCreateCategoryDialog ( ) : System.Threading.Tasks.Task

Displays a dialog that lets the user create a new category.

ShowGiveGoldDialog ( Photo photo ) : Task

Displays a dialog that lets the user give gold

Private Methods

Method Description
EnsureNavigationFrameIsAvailable ( ) : void

Makes sure a frame is available that can be used for navigation.

IsTypePhotoUploadRelated ( Type pageType ) : bool

Checks if the specified type is a photo upload related page.

Navigate ( Type viewModelType, object parameter = null, bool serializeParameter = true ) : void

Navigates to the specified view model type.

Method Details

AddType() public static method

Adds the specified types to the association list.
The ViewModel has already been added and is only allowed once.
public static AddType ( Type view, Type viewModel ) : void
view System.Type The view type.
viewModel System.Type The ViewModel type.
return void

GoBack() public method

Goes back in the navigation stack for the specified number of steps.
public GoBack ( int steps = 1 ) : void
steps int The steps. By default: 1.
return void

NavigateToAboutView() public method

Navigates to the about view.
public NavigateToAboutView ( ) : void
return void

NavigateToCameraView() public method

Navigates to the camera view.
public NavigateToCameraView ( ) : void
return void

NavigateToCameraView() public method

Navigates to the camera view.
public NavigateToCameraView ( CategoryPreview category ) : void
category PhotoSharingApp.Universal.Models.CategoryPreview The category.
return void

NavigateToCategoriesView() public method

Navigates to the categories view.
public NavigateToCategoriesView ( ) : void
return void

NavigateToCropView() public method

Navigates to the crop view.
public NavigateToCropView ( StorageFile file ) : void
file Windows.Storage.StorageFile The photo to crop.
return void

NavigateToCropView() public method

Navigates to the crop view.
public NavigateToCropView ( StorageFile file, CategoryPreview category ) : void
file Windows.Storage.StorageFile The photo to crop.
category PhotoSharingApp.Universal.Models.CategoryPreview The selected category for the photo.
return void

NavigateToPhotoDetailsView() public method

Navigates to the photo details view.
public NavigateToPhotoDetailsView ( CategoryPreview category, Photo photo ) : void
category PhotoSharingApp.Universal.Models.CategoryPreview The category.
photo PhotoSharingApp.Universal.Models.Photo The photo.
return void

NavigateToPhotoDetailsView() public method

Navigates to the photo details view.
public NavigateToPhotoDetailsView ( Photo photo ) : void
photo PhotoSharingApp.Universal.Models.Photo The photo.
return void

NavigateToPhotoDetailsView() public method

Navigates to the photo details view.
public NavigateToPhotoDetailsView ( string photoId ) : void
photoId string The photoId of the photo to navigate to.
return void

NavigateToPhotoStream() public method

Navigates to the photo stream view.
public NavigateToPhotoStream ( Category category ) : void
category PhotoSharingApp.Universal.Models.Category The category.
return void

NavigateToPhotoStream() public method

Navigates to the photo stream view.
public NavigateToPhotoStream ( CategoryPreview category ) : void
category PhotoSharingApp.Universal.Models.CategoryPreview The category preview instance.
return void

NavigateToPhotoStream() public method

Navigates to the photo stream view.
public NavigateToPhotoStream ( CategoryPreview categoryPreview, PhotoThumbnail photoThumbnail ) : void
categoryPreview PhotoSharingApp.Universal.Models.CategoryPreview The category preview instance.
photoThumbnail PhotoSharingApp.Universal.Models.PhotoThumbnail /// The photo thumbnail that will determine the scroll position. ///
return void

NavigateToProfileView() public method

Navigates to the signed-in user's profile view.
public NavigateToProfileView ( ) : void
return void

NavigateToProfileView() public method

Navigates to the given user's profile view.
public NavigateToProfileView ( User user ) : void
user PhotoSharingApp.Universal.Models.User The user to show the profile view for.
return void

NavigateToSignInView() public method

Navigates to the sign-in view.
public NavigateToSignInView ( ) : void
return void

NavigateToUploadView() public method

Navigates to the upload view to update data of the existing photo.
public NavigateToUploadView ( Photo photo, Category category ) : void
photo PhotoSharingApp.Universal.Models.Photo The photo to update.
category PhotoSharingApp.Universal.Models.Category The associated category.
return void

NavigateToUploadView() public method

Navigates to the upload view.
public NavigateToUploadView ( WriteableBitmap image, CategoryPreview category ) : void
image Windows.UI.Xaml.Media.Imaging.WriteableBitmap The image to upload.
category PhotoSharingApp.Universal.Models.CategoryPreview The category to upload the image into.
return void

NavigateToWelcomeView() public method

Navigates to the Welcome View page.
public NavigateToWelcomeView ( ) : void
return void

RemoveBackStackFrames() public method

Displays a dialog that lets the user pick a category. Removes the specified number of frames from the back stack.
public RemoveBackStackFrames ( int numberOfFrames ) : void
numberOfFrames int The number of frames.
return void

RemoveUploadPhotoFramesFromBackStack() public method

Removes the frames associated with uploading a photo from the back stack.
public RemoveUploadPhotoFramesFromBackStack ( string categoryIdNavigatedTo ) : void
categoryIdNavigatedTo string The category id that was navigated to after photo upload.
return void

ShowCategoryChooserDialog() public method

Displays a dialog that lets the user pick a category.
public ShowCategoryChooserDialog ( ) : Task
return Task

ShowCreateCategoryDialog() public method

Displays a dialog that lets the user create a new category.
public ShowCreateCategoryDialog ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

ShowGiveGoldDialog() public method

Displays a dialog that lets the user give gold
public ShowGiveGoldDialog ( Photo photo ) : Task
photo PhotoSharingApp.Universal.Models.Photo
return Task