using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using Wpf.Ui.Abstractions.Controls; namespace BetterGenshinImpact.ViewModel; public abstract partial class ViewModel : ObservableObject, INavigationAware, IViewModel { /// public virtual Task OnNavigatedToAsync() { OnNavigatedTo(); return Task.CompletedTask; } /// /// Handles the event that is fired after the component is navigated to. /// // ReSharper disable once MemberCanBeProtected.Global public virtual void OnNavigatedTo() { } /// public virtual Task OnNavigatedFromAsync() { OnNavigatedFrom(); return Task.CompletedTask; } /// /// Handles the event that is fired before the component is navigated from. /// // ReSharper disable once MemberCanBeProtected.Global public virtual void OnNavigatedFrom() { } }