Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何获得TreeViewa的容器TreeNode??
TreeView
TreeNode
谢谢你们。
除了反射之外似乎没有其他方法:
TreeNode node = GetNode(); TreeView view = (TreeView) node.GetType(). GetProperty("Owner", BindingFlags.Instance | BindingFlags.NonPublic). GetValue(node, null);