I am designing a list-based app in C# WinForms where I want to store my data in an XML file (which will eventually get serialized into a database). I have a custom control that displays my list data based on my XML, but I'm having trouble determining the best structure to handle the data. I have a ListManager class that keeps track of an XMLDocument, and has methods like CreateList and AddListItem. Should I be using a local copy of the XML structure as what my UI Control reads from, or should I use the actual XML File itself? Is there something better than the XMLDocument that I should be storing as a member variable to keep hold of the data?
Also, how should I go about linking the controller with the UI control? In other words, how should my ListManager alert the ListControl when a new item was added? (Or should it not be doing the update notification at all, and instead the Main Form should do that?)
Thanks!