25 lines
658 B
C#
25 lines
658 B
C#
namespace Common.GUI.ViewModels.Controls
|
|
{
|
|
using Common.GUI.ViewModels.Base;
|
|
|
|
using System;
|
|
using System.Windows.Input;
|
|
using System.Windows.Navigation;
|
|
|
|
public class MainMenuVM : VM<MainMenuVM>
|
|
{
|
|
public MainMenuVM()
|
|
=> this.NavigateCommand = new Command<string>(this.NavigateCommandHandler);
|
|
|
|
public ICommand NavigateCommand { get; }
|
|
|
|
private void NavigateCommandHandler(string page)
|
|
{
|
|
if (App.Current.MainWindow is NavigationWindow navigationWindow)
|
|
{
|
|
navigationWindow.Navigate(new Uri(page, UriKind.Relative));
|
|
}
|
|
}
|
|
}
|
|
}
|