質問編集履歴
1
クラス名と名前空間名の変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
```Xaml
|
18
18
|
|
19
|
-
<UserControl x:Class="
|
19
|
+
<UserControl x:Class="TEST.Views.TESTList"
|
20
20
|
|
21
21
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
22
22
|
|
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
xmlns:prism="http://prismlibrary.com/"
|
26
26
|
|
27
|
-
xmlns:viewmodels="clr-namespace:
|
27
|
+
xmlns:viewmodels="clr-namespace:TEST.ViewModels"
|
28
28
|
|
29
29
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
30
30
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
mc:Ignorable="d"
|
34
34
|
|
35
|
-
d:DataContext="{d:DesignInstance Type=viewmodels:
|
35
|
+
d:DataContext="{d:DesignInstance Type=viewmodels:TESTListViewModel}"
|
36
36
|
|
37
37
|
prism:ViewModelLocator.AutoWireViewModel="True">
|
38
38
|
|
@@ -62,7 +62,7 @@
|
|
62
62
|
|
63
63
|
</DataGridTemplateColumn>
|
64
64
|
|
65
|
-
<DataGridTextColumn Header="
|
65
|
+
<DataGridTextColumn Header="名前" Binding="{Binding FileName}" MinWidth="300" Width="*"/>
|
66
66
|
|
67
67
|
<DataGridTextColumn Header="担当" Binding="{Binding Person}" Width="75"/>
|
68
68
|
|
@@ -75,20 +75,6 @@
|
|
75
75
|
<DataTemplate>
|
76
76
|
|
77
77
|
<Button Content="確認" Command="{Binding ShowStatusCheck}"/>
|
78
|
-
|
79
|
-
</DataTemplate>
|
80
|
-
|
81
|
-
</DataGridTemplateColumn.CellTemplate>
|
82
|
-
|
83
|
-
</DataGridTemplateColumn>
|
84
|
-
|
85
|
-
<DataGridTemplateColumn Width="50">
|
86
|
-
|
87
|
-
<DataGridTemplateColumn.CellTemplate>
|
88
|
-
|
89
|
-
<DataTemplate>
|
90
|
-
|
91
|
-
<Button Content="開く"/>
|
92
78
|
|
93
79
|
</DataTemplate>
|
94
80
|
|
@@ -114,88 +100,6 @@
|
|
114
100
|
|
115
101
|
|
116
102
|
|
117
|
-
[UsercontrolのViewModel]
|
118
|
-
|
119
|
-
```C#
|
120
|
-
|
121
|
-
public class WIPListViewModel : BindableBase
|
122
|
-
|
123
|
-
{
|
124
|
-
|
125
|
-
MainWindowViewModel _mainWindowViewModel;
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
public WIPListViewModel(MainWindowViewModel mainWindowViewModel)
|
130
|
-
|
131
|
-
{
|
132
|
-
|
133
|
-
_mainWindowViewModel = mainWindowViewModel;
|
134
|
-
|
135
|
-
foreach(var elm in WorkInProcessList.DB)
|
136
|
-
|
137
|
-
{
|
138
|
-
|
139
|
-
_activeFiles.Add
|
140
|
-
|
141
|
-
(
|
142
|
-
|
143
|
-
new ActiveFileList { FileName = elm.File, Person = elm.Member, Status = elm.Order.ToString() }
|
144
|
-
|
145
|
-
);
|
146
|
-
|
147
|
-
}
|
148
|
-
|
149
|
-
ShowStatusCheck = new DelegateCommand(ShowStatusCheckExecute);
|
150
|
-
|
151
|
-
}
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
private ObservableCollection<ActiveFileList> _activeFiles = new ObservableCollection<ActiveFileList>();
|
156
|
-
|
157
|
-
public ObservableCollection<ActiveFileList> ActiveFiles
|
158
|
-
|
159
|
-
{
|
160
|
-
|
161
|
-
get { return _activeFiles; }
|
162
|
-
|
163
|
-
set { SetProperty(ref _activeFiles, value); }
|
164
|
-
|
165
|
-
}
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
public DelegateCommand ShowStatusCheck { get; }
|
170
|
-
|
171
|
-
private void ShowStatusCheckExecute()
|
172
|
-
|
173
|
-
{
|
174
|
-
|
175
|
-
_mainWindowViewModel.StatusCheckExecute();
|
176
|
-
|
177
|
-
}
|
178
|
-
|
179
|
-
}
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
public class ActiveFileList
|
184
|
-
|
185
|
-
{
|
186
|
-
|
187
|
-
public string FileName { get; set; }
|
188
|
-
|
189
|
-
public string Person { get; set; }
|
190
|
-
|
191
|
-
public string Status { get; set; }
|
192
|
-
|
193
|
-
}
|
194
|
-
|
195
|
-
```
|
196
|
-
|
197
|
-
|
198
|
-
|
199
103
|
### 試したこと
|
200
104
|
|
201
105
|
|