質問編集履歴
1
あdd
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,22 +7,35 @@
|
|
7
7
|
土台にあるプロパティの変化を、子で取得したいです。
|
8
8
|
|
9
9
|
###該当のソースコード
|
10
|
+
|
11
|
+
```xaml
|
12
|
+
BaseView.xaml
|
13
|
+
<Button Content="search" Click="{Binding Search}"/>
|
14
|
+
```
|
15
|
+
|
10
16
|
```c#
|
11
17
|
BaseViewModel.cs
|
12
18
|
private bool search;
|
13
19
|
public bool Search
|
14
20
|
{
|
15
|
-
get { return
|
21
|
+
get { return search; }
|
16
22
|
set
|
17
23
|
{
|
18
24
|
searchExecuted = value;
|
19
|
-
RaisePropertyChanged("
|
25
|
+
RaisePropertyChanged("Search");
|
20
26
|
//ここで子どものButtonExecutableを呼びたい。
|
21
27
|
}
|
22
28
|
}
|
23
29
|
```
|
24
30
|
このSearchを子で把握したい。
|
25
31
|
|
32
|
+
```xaml
|
33
|
+
ChildView.xaml
|
34
|
+
<Button Content="登録"
|
35
|
+
IsEnabled="{Binding ButtonExecutable}"/>
|
36
|
+
```
|
37
|
+
|
38
|
+
|
26
39
|
```C#
|
27
40
|
public class ChildViewModel : ViewModelBase, INotifyPropertyChanged
|
28
41
|
{
|