I have been given the task of converting a forms application to WPF. The application used TreeNode
which is from System.Windows.Forms.TreeView
. I know WPF has TreeView
but I can't find TreeNode
is there a direct conversion for it from Forms to WPF?
2 Answers
TreeNode
has been replaced with TreeViewItem
.
TreeNode.Text
is equivalent to TreeViewItem.Header
TreeNode.Nodes
is equivalent to TreeViewItem.Items
-
2
-
It is TreeViewItem.
-
I would like to add that this is the best conversion we have but, the functionality is not exact. Or I should say the way you go about doing things isn't the same but has more or less the same outcome.– KrillFeb 3, 2010 at 14:37