TreeView With Arbitrary Number of Child Items
-
Hi there, I'm new to WPF, so bear with me. I'm trying to make something like a class browser. I have a tree of objects, but each child in the tree is based on whether the object has variables of a certain type. For example, say I have an Entity class for my game engine. I can have any number of variables in the class, or any derived classes, but I'm only interested in all the variables of type Vector. So for a hypothetical scene, I'd like to show a tree like: scene entity 1 vector worldposition entity 2 vector worldposition vector lookat vector orientation (I hope that was clear enough) [Edit] An additional challenge is if an entity has a variable of type Entity. So another hypothetical scene might look like: entity 1 vector worldposition entity 2 vector worldposition vector lookat vector orientation entity 3 vector worldposition entity child vector worldposition vector lookat The scene could theoretically keep going like this, covering every child entity. What's the best way to display this in a TreeView? Thanks!
-
Hi there, I'm new to WPF, so bear with me. I'm trying to make something like a class browser. I have a tree of objects, but each child in the tree is based on whether the object has variables of a certain type. For example, say I have an Entity class for my game engine. I can have any number of variables in the class, or any derived classes, but I'm only interested in all the variables of type Vector. So for a hypothetical scene, I'd like to show a tree like: scene entity 1 vector worldposition entity 2 vector worldposition vector lookat vector orientation (I hope that was clear enough) [Edit] An additional challenge is if an entity has a variable of type Entity. So another hypothetical scene might look like: entity 1 vector worldposition entity 2 vector worldposition vector lookat vector orientation entity 3 vector worldposition entity child vector worldposition vector lookat The scene could theoretically keep going like this, covering every child entity. What's the best way to display this in a TreeView? Thanks!