将子项目添加到 DevExpress XtraNavBar
我正在使用 DevExpress 的 XtraNavBar,我想弄清楚如何将子项目添加到现有项目。
我已将组和项目添加到这些组中,但我无法弄清楚如何将子项目添加到项目中。
还有其他人这样做过吗?可以通过代码或其他方式完成吗?
(供参考)
编辑
我发现一个方法,这里,但我希望有我想还有另一种方式。构建一个单独的控件(我猜)并嵌入它并不是我希望的答案......
I am using the XtraNavBar from DevExpress and I would like to figure out how to add a child item to an existing item.
I have added Groups and Items to those Groups but I have been unable to figure out how to add child items to the Items.
Has anyone else done this? Can it be done either through code or any other way?
(for reference)
Edit
I found ONE way to do this, HERE, but I was hoping there was another way, I guess. Building a separate control (TreeView I'd guess) and embedding it was not the answer I was HOPING for.....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将 XtraNavBar 视为视图列表,其中 NavBarGroup 代表一个视图。这就是为什么您无法将孩子添加到组中的原因。
在我们的一个应用程序中,我们正在使用此控件。每个 NavBarGroup 都有一个容器,其中包含更复杂的控件。
这是我们如何做到这一点的一个简单示例:
See the XtraNavBar as a list of views where a NavBarGroup represents a view. That's why you cannot add child to a group.
In one of our applications, we are using this control. Each NavBarGroup has a container which contains a more sophisticated control.
Here a simple example how we do it: