シンプルに書いているので、アイテムの表示WPF Application
に使いたいと思いました。私のコードは次のとおりです。ListView
List
WPF.xaml
<ListView Grid.Column="0" Grid.Row="1" Margin="10,0,10,5" ItemsSource="{Binding MyCollection.Elements}">
<ListView.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding ElementDescriptions}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
WPF.xaml.cs
public MyViewModel ViewModel
{
get { return DataContext; }
set { DataContext = value; }
}
MyViewModel.cs
public OwnedCollection Elements { get; set; }
OwnedCollection.cs
public List<ElementDescriptions> ElementDescriptions { get; set; }
簡単なメッセージを表示しても問題がないので、との間の通信は正しいView
と100%確信しています。ViewModel
私は正しいバインディングをしていListView
ますか?