forked from shinyorg/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainViewModel.cs
More file actions
32 lines (23 loc) · 883 Bytes
/
MainViewModel.cs
File metadata and controls
32 lines (23 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System.Windows.Input;
using ReactiveUI;
namespace Sample;
public class MainViewModel : ViewModel
{
//public const string LocalizeKey = nameof(LocalizeKey);
public MainViewModel(BaseServices services) : base(services)
{
// TODO: test localization
this.TestGEH = ReactiveCommand.Create(
() =>
{
throw new ArgumentException("This shouldn't crash your app. You should be seeing this message in a dialog");
}
//this.WhenValid() // this is a hack to ensure prism & shiny are playing nice together
);
this.NavToValidate = this.Navigation.Command("ValidationPage");
this.NavToDialogs = this.Navigation.Command("DialogsPage");
}
public ICommand TestGEH { get; }
public ICommand NavToValidate { get; }
public ICommand NavToDialogs { get; }
}