1
我试图将一组项目绑定到windowcommands
的metrowindow
。以下是xaml片段。MahApps.Metro:WindowCommands ItemsSource绑定
<metro:MetroWindow.WindowCommands>
<metro:WindowCommands ItemsSource="{Binding WindowCommands}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Content="{Binding DisplayName}"
Command="{Binding Callback}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</metro:WindowCommands>
</metro:MetroWindow.WindowCommands>
但它不显示DisplayName
财产,但有界的数据类型的类型名称。我怎样才能达到预期的行为?