Files
ShrlAlgoToolkit/WPFluent/Controls/NavigationView/NavigationAware.cs

42 lines
928 B
C#

namespace WPFluent.Abstractions;
/// <summary>
/// Provides a base class for navigation-aware components.
/// </summary>
public abstract class NavigationAware : INavigationAware
{
/// <summary>
/// Handles the event that is fired before the component is navigated from.
/// </summary>
// ReSharper disable once MemberCanBeProtected.Global
public virtual void OnNavigatedFrom()
{
}
/// <inheritdoc/>
public virtual Task OnNavigatedFromAsync()
{
OnNavigatedFrom();
return Task.CompletedTask;
}
/// <summary>
/// Handles the event that is fired after the component is navigated to.
/// </summary>
// ReSharper disable once MemberCanBeProtected.Global
public virtual void OnNavigatedTo()
{
}
/// <inheritdoc/>
public virtual Task OnNavigatedToAsync()
{
OnNavigatedTo();
return Task.CompletedTask;
}
}