Interface IMBAnimatedNavigationManager
Interface for the animated navigation service. Animated navigations augment Blazor's NavigationManager with minor animation.
First the current page fades out for 40% of the animation period, followed by a call to NavigationManager.NavigateTo(string, bool) before the new page fades in for the remaining 60% of the animation period. The default animation period is 500ms (but seems faster due to the end of the fade in being imperceptible), and animation is disapplied by default.
Throws a InvalidOperationException if NavigateTo(String, Boolean) is called without a MBAnimatedNavigation component used in the app.
You can optionally add configuration when you add this to the service collection:
services.AddMBAnimatedNavigationService(new MBAnimatedNaviationManagerConfiguration()
{
ApplyAnimation = true,
AnimationTime = 300
});
Namespace: Material.Blazor
Assembly: Material.Blazor.dll
Syntax
public interface IMBAnimatedNavigationManager
Properties
| Improve this Doc View SourceConfiguration
Animated Navigation Service configuration.
Declaration
MBAnimatedNavigationManagerServiceConfiguration Configuration { get; set; }
Property Value
Type | Description |
---|---|
MBAnimatedNavigationManagerServiceConfiguration |
FadeInTime
The calculated fade in time in milliseconds.
Declaration
int FadeInTime { get; }
Property Value
Type | Description |
---|---|
Int32 |
FadeOutTime
The calculated fade out time in milliseconds.
Declaration
int FadeOutTime { get; }
Property Value
Type | Description |
---|---|
Int32 |
NavigationManager
The Blazor NavigationManager.
Declaration
NavigationManager NavigationManager { get; set; }
Property Value
Type | Description |
---|---|
NavigationManager |
Methods
| Improve this Doc View SourceDeregisterNavigationComponent(MBAnimatedNavigation)
Called by MBAnimatedNavigation to deregister itself with the service.
Declaration
void DeregisterNavigationComponent(MBAnimatedNavigation navigationComponent)
Parameters
Type | Name | Description |
---|---|---|
MBAnimatedNavigation | navigationComponent |
NavigateTo(String, Boolean)
Navigates to the specified URI.
Declaration
void NavigateTo(string uri, bool forceLoad = false)
Parameters
Type | Name | Description |
---|---|---|
String | uri | The destination URI. This can be absolute, or relative to the base URI (as returned by Microsoft.AspNetCore.Components.NavigationManager.BaseUri). |
Boolean | forceLoad | If true, bypasses client-side routing and forces the browser to load the new page from the server, whether or not the URI would normally be handled by the client-side router. |
RegisterNavigationComponent(MBAnimatedNavigation)
Called by MBAnimatedNavigation to register itself with the service.
Declaration
void RegisterNavigationComponent(MBAnimatedNavigation navigationComponent)
Parameters
Type | Name | Description |
---|---|---|
MBAnimatedNavigation | navigationComponent |