25 lines
686 B
C#
25 lines
686 B
C#
namespace Common.UI.ViewModels
|
|
{
|
|
using Common.UI.Infrastructure;
|
|
using Common.UI.Infrastructure.Contracts;
|
|
|
|
using System;
|
|
using System.Windows.Input;
|
|
|
|
internal class MainMenuVM : ViewModel<MainMenuVM>
|
|
{
|
|
private readonly INavigation navigation;
|
|
|
|
public MainMenuVM() : base()
|
|
{
|
|
this.navigation = AppHost.GetService<INavigation>();
|
|
this.NavigateCommand = new Command<string>(this.NavigateCommandHandler);
|
|
}
|
|
|
|
public ICommand NavigateCommand { get; }
|
|
|
|
private void NavigateCommandHandler(string uri)
|
|
=> this.navigation.Navigate(new Uri(uri, UriKind.RelativeOrAbsolute));
|
|
}
|
|
}
|