Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

OutlookBar for WPF & Silverlight

0.00/5 (No votes)
28 May 2010 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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here