回答編集履歴
2
修正
answer
CHANGED
@@ -22,11 +22,6 @@
|
|
22
22
|
<Setter Property="IsSelected" Value="{Binding IsChecked}"/>
|
23
23
|
</Style>
|
24
24
|
</DataGrid.ItemContainerStyle>
|
25
|
-
<DataGrid.ItemTemplate>
|
26
|
-
<DataTemplate>
|
27
|
-
<CheckBox IsChecked="{Binding IsChecked}" Content="{Binding Text}"/>
|
28
|
-
</DataTemplate>
|
29
|
-
</DataGrid.ItemTemplate>
|
30
25
|
</DataGrid>
|
31
26
|
</Grid>
|
32
27
|
</Window>
|
1
ListBox を DataGrid に変更
answer
CHANGED
@@ -16,18 +16,18 @@
|
|
16
16
|
<local:MainViewModel/>
|
17
17
|
</Window.DataContext>
|
18
18
|
<Grid>
|
19
|
-
<
|
19
|
+
<DataGrid ItemsSource="{Binding Items}" SelectionMode="Extended">
|
20
|
-
<
|
20
|
+
<DataGrid.ItemContainerStyle>
|
21
|
-
<Style TargetType="{x:Type
|
21
|
+
<Style TargetType="{x:Type DataGridRow}">
|
22
22
|
<Setter Property="IsSelected" Value="{Binding IsChecked}"/>
|
23
23
|
</Style>
|
24
|
-
</
|
24
|
+
</DataGrid.ItemContainerStyle>
|
25
|
-
<
|
25
|
+
<DataGrid.ItemTemplate>
|
26
26
|
<DataTemplate>
|
27
27
|
<CheckBox IsChecked="{Binding IsChecked}" Content="{Binding Text}"/>
|
28
28
|
</DataTemplate>
|
29
|
-
</
|
29
|
+
</DataGrid.ItemTemplate>
|
30
|
-
</
|
30
|
+
</DataGrid>
|
31
31
|
</Grid>
|
32
32
|
</Window>
|
33
33
|
```
|