回答編集履歴
1
コード記載
answer
CHANGED
|
@@ -9,4 +9,30 @@
|
|
|
9
9
|
リストボックス内容がマスタデータなどであれば、View側でDataContextを検索して別途設定します。
|
|
10
10
|
|
|
11
11
|
今時点ではこの程度の回答しかできませんので、現在どこまで実装できてどこがわからないので
|
|
12
|
-
提示してください。
|
|
12
|
+
提示してください。
|
|
13
|
+
|
|
14
|
+
まずはDataGridのConboBoxを表示させるところまで。
|
|
15
|
+
これをたたき台にやりたいことを明記して頂けると。
|
|
16
|
+
|
|
17
|
+
```XAML
|
|
18
|
+
<Window x:Class="WpfApplication2.MainWindow"
|
|
19
|
+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
20
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
21
|
+
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
22
|
+
Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
|
|
23
|
+
<Window.Resources>
|
|
24
|
+
<x:Array x:Key="hogeList" Type="sys:String">
|
|
25
|
+
<sys:String>1</sys:String>
|
|
26
|
+
<sys:String>2</sys:String>
|
|
27
|
+
</x:Array>
|
|
28
|
+
</Window.Resources>
|
|
29
|
+
<Grid>
|
|
30
|
+
<DataGrid ItemsSource="{StaticResource hogeList}">
|
|
31
|
+
<DataGrid.Columns>
|
|
32
|
+
<DataGridTextColumn Header="AAA" />
|
|
33
|
+
<DataGridComboBoxColumn Header="BBB" />
|
|
34
|
+
</DataGrid.Columns>
|
|
35
|
+
</DataGrid>
|
|
36
|
+
</Grid>
|
|
37
|
+
</Window>
|
|
38
|
+
```
|