mirror of
https://github.com/leiurayer/downkyi.git
synced 2026-10-20 16:48:33 +00:00
48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using Prism.Commands;
|
|
using Prism.Mvvm;
|
|
using Prism.Regions;
|
|
|
|
namespace DatabaseManager.ViewModels
|
|
{
|
|
public class MainWindowViewModel : BindableBase
|
|
{
|
|
private readonly IRegionManager regionManager;
|
|
|
|
|
|
private string _title = "DatabaseManager";
|
|
public string Title
|
|
{
|
|
get { return _title; }
|
|
set { SetProperty(ref _title, value); }
|
|
}
|
|
|
|
public MainWindowViewModel(IRegionManager regionManager)
|
|
{
|
|
this.regionManager = regionManager;
|
|
}
|
|
|
|
|
|
|
|
private DelegateCommand coverCommand;
|
|
public DelegateCommand CoverCommand => coverCommand ?? (coverCommand = new DelegateCommand(ExecuteCoverCommand));
|
|
|
|
private void ExecuteCoverCommand()
|
|
{
|
|
regionManager.RequestNavigate("ContentRegion", "Cover");
|
|
}
|
|
|
|
private DelegateCommand headerCommand;
|
|
public DelegateCommand HeaderCommand => headerCommand ?? (headerCommand = new DelegateCommand(ExecuteHeaderCommand));
|
|
|
|
private void ExecuteHeaderCommand()
|
|
{
|
|
regionManager.RequestNavigate("ContentRegion", "Header");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|