我想在像 city_Name 这样的列导航属性中显示我写了这段代码但什么也没发生
<DataGrid Margin="210,15" Grid.Row="1" CanUserAddRows="False" AutoGenerateColumns="False" Name="dg_Super" RowHeight="20" >
<DataGrid.Columns>
<DataGridTextColumn Width="*" Header="Super Name" Binding="{Binding Path=SupermarketName, Mode=OneTime}"></DataGridTextColumn>
<DataGridTextColumn Width="*" Header="City" Binding="{Binding Path=City1.CityName, Mode=OneTime}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
和 c# 代码
var super = mh.Supermarkets;
dg_Super.ItemsSource = super.ToList();
City1 是 ef 模型的导航属性。请问这里有什么问题吗?