using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using XFEExtension.NetCore.WinUIHelper.Interface.Services; using XFEExtension.NetCore.WinUIHelper.Utilities; namespace XFEWarframe.Admin.ViewModels; public partial class AppShellPageViewModel : ObservableObject { public INavigationViewService NavigationViewService { get; } = ServiceManager.GetService(); public IMessageService MessageService { get; } = ServiceManager.GetService(); public ILoadingService LoadingService { get; } = ServiceManager.GetService(); [ObservableProperty] public partial bool CanGoBack { get; set; } public AppShellPageViewModel() => NavigationViewService.NavigationService.Navigated += (_, _) => CanGoBack = NavigationViewService.NavigationService.CanGoBack; [RelayCommand] private void GoBack() => NavigationViewService.NavigationService.GoBack(); }