回答編集履歴

2

修正

2019/09/24 10:15

投稿

Zuishin
Zuishin

スコア28662

test CHANGED
@@ -45,16 +45,6 @@
45
45
  </Style>
46
46
 
47
47
  </DataGrid.ItemContainerStyle>
48
-
49
- <DataGrid.ItemTemplate>
50
-
51
- <DataTemplate>
52
-
53
- <CheckBox IsChecked="{Binding IsChecked}" Content="{Binding Text}"/>
54
-
55
- </DataTemplate>
56
-
57
- </DataGrid.ItemTemplate>
58
48
 
59
49
  </DataGrid>
60
50
 

1

ListBox を DataGrid に変更

2019/09/24 10:15

投稿

Zuishin
Zuishin

スコア28662

test CHANGED
@@ -34,19 +34,19 @@
34
34
 
35
35
  <Grid>
36
36
 
37
- <ListBox ItemsSource="{Binding Items}" SelectionMode="Multiple">
37
+ <DataGrid ItemsSource="{Binding Items}" SelectionMode="Extended">
38
-
38
+
39
- <ListBox.ItemContainerStyle>
39
+ <DataGrid.ItemContainerStyle>
40
-
40
+
41
- <Style TargetType="{x:Type ListBoxItem}">
41
+ <Style TargetType="{x:Type DataGridRow}">
42
42
 
43
43
  <Setter Property="IsSelected" Value="{Binding IsChecked}"/>
44
44
 
45
45
  </Style>
46
46
 
47
- </ListBox.ItemContainerStyle>
47
+ </DataGrid.ItemContainerStyle>
48
-
48
+
49
- <ListBox.ItemTemplate>
49
+ <DataGrid.ItemTemplate>
50
50
 
51
51
  <DataTemplate>
52
52
 
@@ -54,9 +54,9 @@
54
54
 
55
55
  </DataTemplate>
56
56
 
57
- </ListBox.ItemTemplate>
57
+ </DataGrid.ItemTemplate>
58
-
58
+
59
- </ListBox>
59
+ </DataGrid>
60
60
 
61
61
  </Grid>
62
62