Class NavigationViewPageProviderExtensions
- Namespace
- Wpf.Ui.Abstractions
- Assembly
- Wpf.Ui.Abstractions.dll
Provides extension methods for the INavigationViewPageProvider interface.
public static class NavigationViewPageProviderExtensions
- Inheritance
-
NavigationViewPageProviderExtensions
- Inherited Members
Methods
GetPage<TPage>(INavigationViewPageProvider)
Retrieves a page of the specified type from the page service.
public static TPage? GetPage<TPage>(this INavigationViewPageProvider navigationViewPageProvider) where TPage : class
Parameters
navigationViewPageProvider
INavigationViewPageProviderThe page service instance.
Returns
- TPage
An instance of the specified page type, or null if the page is not found.
Type Parameters
TPage
The type of the page to retrieve.
GetRequiredPage<TPage>(INavigationViewPageProvider)
Retrieves a page of the specified type from the page service. Throws a NavigationException if the page is not found.
public static TPage GetRequiredPage<TPage>(this INavigationViewPageProvider navigationViewPageProvider) where TPage : class
Parameters
navigationViewPageProvider
INavigationViewPageProviderThe page service instance.
Returns
- TPage
An instance of the specified page type.
Type Parameters
TPage
The type of the page to retrieve.
Exceptions
- NavigationException
Thrown when the specified page type is not found.