Click here to Skip to main content
16,008,469 members
Home / Discussions / C#
   

C#

 
GeneralRe: add item to Outlooks contactmenu Pin
Heath Stewart26-Jul-04 19:01
protectorHeath Stewart26-Jul-04 19:01 
GeneralCustom ListView - XP theme Pin
Andy H26-Jul-04 1:06
Andy H26-Jul-04 1:06 
GeneralRe: Custom ListView - XP theme Pin
Heath Stewart26-Jul-04 11:21
protectorHeath Stewart26-Jul-04 11:21 
GeneralCustom ListView - XP theme Pin
Andy H26-Jul-04 1:06
Andy H26-Jul-04 1:06 
GeneralDrawing Control Pin
blankg25-Jul-04 23:47
blankg25-Jul-04 23:47 
GeneralRe: Drawing Control Pin
Gary Thom26-Jul-04 7:19
Gary Thom26-Jul-04 7:19 
QuestionOutlook - right part of the window? Pin
BillyBlue25-Jul-04 23:11
BillyBlue25-Jul-04 23:11 
AnswerRe: Outlook - right part of the window? Pin
Heath Stewart26-Jul-04 11:20
protectorHeath Stewart26-Jul-04 11:20 
This isn't something you can just throw together with the designer, unless you've bought some expensive third-party control that does this for you.

It's quite simple, though. A good object-oriented design would place the Outlook-like sidebar on one side and a container (like a Panel on the other. For each clickable icon in your Outlook-like sidebar, you would implement a UserControl (for example - could be any Control derivative although a container control is typically best) in your project. You need to associate that control with your sidebar icon. You could store the Type in the Tag property (if applicable) for the sidebar icons, or use attributes or whatever.

When the icon is clicked, you create an instance of that Control (perhaps maintaining a Hashtable with types and instances so that you can simply reuse a previously instantiated instance) and parent it (i.e., use Pane.Controls.Add) to the Panel on the other side. When a different icon is clicked, remove that Control (if an instance of it is still held - perhaps in that lookup table I mentioned above - it will remain in memory) using Panel.Controls.RemoveAt(0) (for example) and add the Control associated with the icon that was clicked.

This is really a simple OO design and there are many examples of similar designers here on CodeProject. I suggest trying a search or browsing the categories to read a few of these for specific details.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Outlook - right part of the window? Pin
BillyBlue27-Jul-04 3:03
BillyBlue27-Jul-04 3:03 
GeneralRe: Outlook - right part of the window? Pin
Heath Stewart27-Jul-04 5:44
protectorHeath Stewart27-Jul-04 5:44 
GeneralRe: Outlook - right part of the window? Pin
BillyBlue27-Jul-04 6:06
BillyBlue27-Jul-04 6:06 
GeneralRe: Outlook - right part of the window? Pin
Heath Stewart27-Jul-04 6:17
protectorHeath Stewart27-Jul-04 6:17 
GeneralRe: Outlook - right part of the window? Pin
BillyBlue27-Jul-04 6:25
BillyBlue27-Jul-04 6:25 
GeneralRe: Outlook - right part of the window? Pin
Heath Stewart27-Jul-04 9:08
protectorHeath Stewart27-Jul-04 9:08 
GeneralRe: Outlook - right part of the window? Pin
BillyBlue27-Jul-04 9:43
BillyBlue27-Jul-04 9:43 
QuestionHow to use NotifyParentPropertyAttribute Pin
jjansen25-Jul-04 21:19
jjansen25-Jul-04 21:19 
AnswerRe: How to use NotifyParentPropertyAttribute Pin
Heath Stewart26-Jul-04 10:13
protectorHeath Stewart26-Jul-04 10:13 
GeneralRe: How to use NotifyParentPropertyAttribute Pin
jjansen27-Jul-04 21:02
jjansen27-Jul-04 21:02 
GeneralProblems with GC and HttpWebResponse Pin
Amir Zicherman25-Jul-04 8:38
Amir Zicherman25-Jul-04 8:38 
GeneralRe: Problems with GC and HttpWebResponse Pin
Heath Stewart26-Jul-04 10:02
protectorHeath Stewart26-Jul-04 10:02 
GeneralRe: Problems with GC and HttpWebResponse Pin
Amir Zicherman27-Jul-04 7:59
Amir Zicherman27-Jul-04 7:59 
GeneralRe: Problems with GC and HttpWebResponse Pin
Heath Stewart27-Jul-04 10:43
protectorHeath Stewart27-Jul-04 10:43 
Questionif(DateTime.Now>=OldDateTime)..???? Pin
Adel83k25-Jul-04 6:02
Adel83k25-Jul-04 6:02 
AnswerRe: if(DateTime.Now>=OldDateTime)..???? Pin
ChrisAdams25-Jul-04 12:43
ChrisAdams25-Jul-04 12:43 
AnswerRe: if(DateTime.Now>=OldDateTime)..???? Pin
DougW4825-Jul-04 19:17
DougW4825-Jul-04 19:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.