forked from CommentViewerCollection/MultiCommentViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommentPostPanelViewModel.cs
More file actions
43 lines (38 loc) · 1013 Bytes
/
CommentPostPanelViewModel.cs
File metadata and controls
43 lines (38 loc) · 1013 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
32
33
34
35
36
37
38
39
40
41
42
43
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.CommandWpf;
using System.Windows.Input;
namespace TestSitePlugin
{
public class CommentPostPanelViewModel : ViewModelBase
{
private TestCommentProvider _testCommentProvider;
private string _input;
public ICommand PostCommand { get; }
public string Input
{
get
{
return _input;
}
set
{
_input = value;
RaisePropertyChanged();
}
}
async void Post()
{
var input = Input;
Input = "";
await _testCommentProvider.PostCommentAsync(input);
}
public CommentPostPanelViewModel()
{
}
public CommentPostPanelViewModel(TestCommentProvider testCommentProvider)
{
this._testCommentProvider = testCommentProvider;
PostCommand = new RelayCommand(Post);
}
}
}