User interface question

Hi all,

I'm building a software which has a UI similar as outlook 2003. The problem I'm facing is how can I perform dynamic content change while the user click the navigation buttons.
I did think about using MDI but that is not what I want as it obviously not how the outlook implement. Thus, i think about using panels and swap between them. However, it seems very hard to design as i need to cover a new panel to the previous one.

It anyone can tell me how outlook implement the dynamic content change

thxs alot.


Answer this question

User interface question

  • bgrva

    Hi JRQ,

    What you said does make sense to me but can you provide some exmple about how to actually implement that because I'm still confuse about how to implement custom view.

    By the way, I'm using c# to build the program.

    Thxs alot,

    D11

  • Shiny Zhu

    Create a custom usercontrol for each view. This way you can just toggle their visibility depending on the button that was click. Usercontrol creation is the key to creating a UI that is very complicated.


  • RoryM

    I don't know how Outlook actually does it, but it shouldn't be hard to create a few panels (or usercontrols), and set their Visible properties whenever you want to switch to a different one.

  • Mark Leung

    There are couple of articles available at codeproject.com...

    Check this link

    http://www.codeproject.com/article.asp tag=19420762603638880


  • WizMan

    Build User Controls for all the views that you want. You can pretty much encapsulate most of the work inside each view. If you need an outside manipulation. You can expose a property or a method. If you need the user control to notify the parent/container, you create an event delegate. You might want use a panel on the main form to hold the views.

    Ex user controls.
    1. Calendar
    2. Email
    3. Contacts
    and so on...

    Create a user control for the side bar that contains the buttons to toggle the view. This way you can encapsulate how the side bar should behave. Create an event delegate for the button corresponding to the view.

    Ex.

    Define an event delegate CalendarButton_Click(I usually just use the argument that comes with the default Button_ClickEvent) that you want to bubble up.
    Inside the default btnCalendarButton_Click add RaiseEvent CalendarButton_Click(sender, e);

    Now your mainform can catch the event of the sidebar buttons. You will see your custom events for the sidebar under the Misc Category (click on the Lightning Icon).

    The actual event should look something like this;

    CalendarButton_Click
    {
      if (cal == null)
      {
         cal = new CalendarView(); // in this case cal is a class level object
         panel.Controls.Add(cal);
       }

       cal.Visible = true;
       email.Visible = false;
       contact.Visible = false;

    My personal approach is to;
    1. Use a property or method to communicate with the child control
    2. Use an event delegate to make the child control communicate with the parent


  • User interface question