26 lines
679 B
C#
26 lines
679 B
C#
namespace Common.UI.ViewModels
|
|
{
|
|
using Common.UI.Infrastructure;
|
|
|
|
using System;
|
|
using System.Windows.Input;
|
|
using System.Windows.Navigation;
|
|
|
|
internal class MainMenuVM : VM<MainMenuVM>
|
|
{
|
|
public MainMenuVM()
|
|
: base()
|
|
=> this.NavigateCommand = new Command<string>(this.NavigateCommandHandler);
|
|
|
|
public ICommand NavigateCommand { get; }
|
|
|
|
private void NavigateCommandHandler(string uri)
|
|
{
|
|
if (App.Current.MainWindow is NavigationWindow navigationWindow)
|
|
{
|
|
navigationWindow.Navigate(new Uri(uri, UriKind.RelativeOrAbsolute));
|
|
}
|
|
}
|
|
}
|
|
}
|