質問編集履歴
1
ソースコードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -21,3 +21,93 @@
|
|
21
21
|
Prism Core v8.0.0.1909
|
22
22
|
|
23
23
|
Prism Unity v8.0.0.1909
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
頂いた回答を基に作成しました。
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
### 作成したソースコード
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
```xml:MainWindow.xaml
|
38
|
+
|
39
|
+
<Window x:Class="BlankApp1.Views.MainWindow"
|
40
|
+
|
41
|
+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
42
|
+
|
43
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
44
|
+
|
45
|
+
xmlns:prism="http://prismlibrary.com/"
|
46
|
+
|
47
|
+
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
48
|
+
|
49
|
+
prism:ViewModelLocator.AutoWireViewModel="True"
|
50
|
+
|
51
|
+
Title="Test" Height="350" Width="525">
|
52
|
+
|
53
|
+
<Grid>
|
54
|
+
|
55
|
+
<Calendar>
|
56
|
+
|
57
|
+
<i:Interaction.Triggers>
|
58
|
+
|
59
|
+
<i:EventTrigger EventName="SelectedDatesChanged">
|
60
|
+
|
61
|
+
<prism:InvokeCommandAction Command="{Binding SelectCommand}" />
|
62
|
+
|
63
|
+
</i:EventTrigger>
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
</i:Interaction.Triggers>
|
68
|
+
|
69
|
+
</Calendar>
|
70
|
+
|
71
|
+
</Grid>
|
72
|
+
|
73
|
+
</Window>
|
74
|
+
|
75
|
+
```
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
```c#:MainWindowViewModel
|
80
|
+
|
81
|
+
public class MainWindowViewModel : BindableBase
|
82
|
+
|
83
|
+
{
|
84
|
+
|
85
|
+
public DelegateCommand<SelectionChangedEventArgs> SelectCommand { get; }
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
public MainWindowViewModel()
|
90
|
+
|
91
|
+
{
|
92
|
+
|
93
|
+
this.SelectCommand = new DelegateCommand<SelectionChangedEventArgs>(this.ExecuteCommand);
|
94
|
+
|
95
|
+
}
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
private void ExecuteCommand(SelectionChangedEventArgs e)
|
100
|
+
|
101
|
+
{
|
102
|
+
|
103
|
+
Console.WriteLine("Date:{0}", e.OriginalSource.ToString());
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
}
|
108
|
+
|
109
|
+
```
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
ここにより詳細な情報を記載してください。
|