Reputation: 9966
I've come across an interesting situation whilst starting to work with the WPF framework.
I have the following code to create an ObservableCollection of type Foo
ObservableCollection<Foo> myFoo;
Foo has the following Properties:
Both Name and Folder have the OnPropertyChanged event implemented (Items already uses ObservableCollection so I believe no additional implementation work is necessary).
For every item within myFoo I would like to show the following:
e.g.
FileC.PNG
Test Name 2
I've implemented the binding for the Name and Folder properties, however I'm not too sure on how I should implement binding the value of each Items.FileInfo.FullName occurance.
Would I need to implement a Converter?
Many thanks for your help.
Upvotes: 3
Views: 109
Reputation: 121037
You need to look into HierarchicalDataTemplate
. Maybe start with this question.
Upvotes: 3