Challenges making a simple UI in a C# program... guidance much appreciated
In brief: made a C# program that fills a TreeView control with info parsed from a file and displays it with
PanelManager.DisplayControl(treeView... - works wonderfully (IMHO) - and employs
treeView.DrawMode = TreeViewDrawMode.OwnerDrawText and
DrawNode += new DrawTreeNodeEventHandler(DrawNode) to make it render nicely.
Now I decide that I need to add buttons so that I can reload the file and redisplay it ... as well as do other things. So I make some buttons using
PanelManager.StackWpfElement(loadButton...... and when I click the button, it makes another Panel with a TreeView control...
Try as I might, I can't seem how to figure out how to re-use or delete/recreate a TreeView on its own panel so that there is a single "TreeView panel" after subsequent requests to reload. I am hesitant to recode the TreeView using a wpf control due the the time invested so far, and the challenges that I have overcome with that .. especially if the outcome is going to be bleak.
Many thanks in advance.
(Yet another fan on LINQPad)