Hi all,
I'm investigating the Model View Presenter pattern. So far I like what I see, however pretty much all of the articles, webcasts, podcasts etc. I've seen, read or heard tend to deal with setting and retrieving simple types from textboxes and I'm struggling to understand how to deal with more complicated UI controls.
For example, imagine I have a CheckedListBox. In this CLB I want to display all available choices and the choices selected for a given instance (imagine a Friend class with a FavouriteIceCreamFlavours List). I can fill the list box easily, but how then would I set which are selected (say on a subsequent edit of this friend). Also, how would I then persist those changes back to the underlying Friend object?
Another candidate would be a TreeView. Suppose by right clicking a node in the TV I want the user to be able to delete that node - what's the best approach of communicating that action back to the Presenter?
Cheers,
Lenny.
(PS I'm developing in a C# 3.5/WinForms environment)