質問編集履歴

1

コードについて追加修正を行いました。

2019/02/04 07:21

投稿

siksmtt
siksmtt

スコア20

test CHANGED
File without changes
test CHANGED
@@ -20,7 +20,21 @@
20
20
 
21
21
  ```C#
22
22
 
23
- //コードビハインド
23
+ //MainWindow - Codebehind
24
+
25
+ using System;
26
+
27
+ using System.Collections.Generic;
28
+
29
+ using System.Windows;
30
+
31
+ using OxyPlot;
32
+
33
+ using OxyPlot.Series;
34
+
35
+ using OxyPlot.Axes;
36
+
37
+
24
38
 
25
39
  public partial class MainWindow : Window
26
40
 
@@ -108,7 +122,7 @@
108
122
 
109
123
  ```C#
110
124
 
111
- //ViewModel
125
+ //MainWindow - ViewModel
112
126
 
113
127
  public class MainViewModel : ViewModelBase
114
128
 
@@ -192,7 +206,37 @@
192
206
 
193
207
 
194
208
 
209
+ ```C# and Xaml
210
+
211
+ //SubWindow - View
212
+
213
+ <Grid>
214
+
215
+ <oxy:PlotView Model="{Binding ChartList}" />
216
+
217
+ </Grid>
218
+
219
+
220
+
221
+ //SubWindow - Codebehind
222
+
223
+ public partial class SubWindow : Window
224
+
225
+ {
226
+
195
- SubWindowViewModelをChartListにバインドさせただけです。
227
+ public SubWindow(MainViewModel pMainViewModel)
228
+
229
+ {
230
+
231
+ InitializeComponent();
232
+
233
+ this.DataContext = pMainViewModel;
234
+
235
+ }
236
+
237
+ }
238
+
239
+ ```
196
240
 
197
241
 
198
242