以下是我的 DataGrid XAML :
<DataGrid Visibility="Visible" Margin="20" ItemContainerStyle="{x:Null}" OverridesDefaultStyle="False" CellStyle="{x:Null}" Style="{x:Null}" RowStyle="{x:Null}" ColumnHeaderStyle="{x:Null}" Foreground="Black" CanUserAddRows="True" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ItemsSource="{Binding Path=MovieList}">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Title, Mode=TwoWay}" CanUserResize="True" MaxWidth="450" CanUserSort="True" Header="Title" Width="200" />
<DataGridTemplateColumn Width="130" Header="Type">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Type}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox Width="120" ItemsSource="{Binding Path=GenreList}" DisplayMemberPath="Name" SelectedValuePath="ID" Height="Auto" HorizontalAlignment="Center" Name="comboBox1" VerticalAlignment="Top" />
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
单元格编辑模板有一个绑定到可观察集合“GenreList”的组合框。此集合在 ViewModel 中初始化。ComboBox 没有被填充的原因可能是什么?