Click here to Skip to main content
15,867,756 members
Articles / Desktop Programming / WPF

OutlookBar for WPF & Silverlight

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
28 May 2010CPOL 15K   3   1
OutlookBar for WPF & Silverlight

A while ago, I wrote a CodeProject article on how to re-style a TabControl to look like the Outlook navigation bar/pane… The article had a good response and loads of people were asking for a Silverlight version. I decided to take the stripped down version of that control (without all the theme stuff) and create a custom control that does this out of the box! I then spent some time to make sure that it works in WPF & Silverlight.

To use it is extremely easy, just create a new OutlookBar:

XML
<ob:OutlookBar>
    
</ob:OutlookBar>  

And manually add new OutlookBarItems:

XML
<ob:OutlookBar>
    <ob:OutlookBarItem Title="Blue (Title)" Header="Blue">
        <Border Background="Blue">
            <TextBlock Text="Blue" />
        </Border>
    </ob:OutlookBarItem>
    <ob:OutlookBarItem Title="Yellow (Title)" Header="Yellow">
        <Border Background="Yellow">
            <TextBlock Text="Yellow" />
        </Border>
    </ob:OutlookBarItem>
    <ob:OutlookBarItem Title="Lime (Title)" Header="Lime">
        <Border Background="Lime">
            <TextBlock Text="Lime" />
        </Border>
    </ob:OutlookBarItem>
</ob:OutlookBar>  

This control can also be data-bound (because it derives from ItemsControl) and is 100% MVVM-able.

P.S.: I will also be releasing some default themes for it pretty soon!!!

Here is the source.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
South Africa South Africa
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralGreat !!! Pin
Tomáš Szkandera22-Mar-11 22:38
Tomáš Szkandera22-Mar-11 22:38 
Have you got some themes pls?
thx

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.