25 lines
707 B
C#
25 lines
707 B
C#
|
|
namespace Common.UI.ViewModels
|
|||
|
|
{
|
|||
|
|
using Common.UI.Infrastructure;
|
|||
|
|
using Common.UI.Infrastructure.Contracts;
|
|||
|
|
|
|||
|
|
using System;
|
|||
|
|
using System.Windows.Input;
|
|||
|
|
|
|||
|
|
internal class MainMenuViewModel : ViewModel<MainMenuViewModel>
|
|||
|
|
{
|
|||
|
|
private readonly INavigation navigation;
|
|||
|
|
|
|||
|
|
public MainMenuViewModel() : 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));
|
|||
|
|
}
|
|||
|
|
}
|