Files
Apollon/Apollon.WPF/Commands/NavigateCommand.cs
2022-11-26 20:40:45 +01:00

28 lines
698 B
C#

using Apollon.WPF.Services;
using Apollon.WPF.Stores;
using Apollon.WPF.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Apollon.WPF.Commands
{
public class NavigateCommand<TViewModel> : CommandBase
where TViewModel : ViewModelBase
{
private readonly NavigationService<TViewModel> _navigationService;
public NavigateCommand(NavigationService<TViewModel> navigationService)
{
_navigationService = navigationService;
}
public override void Execute(object parameter)
{
_navigationService.Navigate();
}
}
}