1

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?

user607455
  • 479
  • 5
  • 18
  • There is some sparse info by way of documentation and code samples here: https://github.com/dockpanelsuite/dockpanelsuite/wiki/_pages – bgmCoder May 02 '13 at 03:43

1 Answers1

0

Hard to answer your question without knowing how you have your DockContent(s) set up.

Assuming you have two classes:

public class ChatRoom : DockContent{}

public class UserList : DockContent{}

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.

public class ChatRoom : DockContent
{
    private UserList MyUserList;

    public void Register(UserList list)
    {
        MyUserList = list;
    }

    public void UserIn(User newUser)
    {
        // Code for adding user to chat room
        MyUserList.Add(newUser);
    }
}
NominSim
  • 8,447
  • 3
  • 28
  • 38