Exempel av användande CellTemplate/CellEditTemplate
i DataGrid (w/ComboBox).
xmlns= " http://schemas.microsoft.com/winfx/2006/xaml/presentation ",
xmlns: x= " http://schemas.microsoft.com/winfx/2006/xaml ",
xmlns: data=" clr-namespace: System.Windows.Controls; assembly=System.Windows.Controls.Data ",
xmlns: src=" clr-namespace: Silverlight ",
Width= " 400 " Height= " 300 " >
n Header= " stad " >
n.CellTemplate>
mn.CellTemplate>
n.CellEditingTemplate>
ItemsSource= " {bindande CityList, Source= {StaticResource cityProvider}} ”,
DisplayMemberPath= " CityName ",
/>
mn.CellEditingTemplate>
mn>
Ovanför var från
http://weblogs.asp.net/manishdalal/archive/2008/09/28/combobox-in-datagrid.aspxHTH
Ashok