如何使用 DockPanel Suite 将 DockContent 添加到 DockPane
正如标题。
例如,我有多个聊天室和多个用户列表。我将所有用户列表添加到右侧停靠栏上。
问题是,如果用户将用户列表更改为底部停靠栏,我仍然会添加到右侧停靠栏。
如何将内容添加到窗格中,以便即使用户更改位置,它也会添加到正确的位置?
请问哪里有WeiFenLuo的DockPanel Suite的gd文档吗?
As the title.
For example I have multi chat rooms with multiple userlist. I added all the userlist onto the right dock.
Problem is if the user changes the userlist into bottom dock, I'll still be adding to the right dock.
How do I add a content into a pane such that even if the user changes the location, it'll add to the correct place?
Is there any place with gd documentation of WeiFenLuo's DockPanel Suite?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果不知道如何设置 DockContent,则很难回答您的问题。
假设您有两个类:
您所要做的就是在彼此相关的两个实例之间创建依赖关系。同样,在不了解更多细节的情况下,很难告诉您哪种方式最好,但是您可以添加一个方法,将特定的 ChatRoom 注册到 UserList,并且每次用户离开或进入房间时,您都可以从该房间中添加/删除该用户。列表。
Hard to answer your question without knowing how you have your DockContent(s) set up.
Assuming you have two classes:
All you should have to do is create a dependency between the two instances that relate to one another. Again it is hard to tell you which way is best without knowing more specifics, but you can just add a method that registers the specific ChatRoom with the UserList, and everytime a user leaves or enters the room, you add/remove the user from the list.