Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

XPlorerBar: A WPF Windows XP Style Explorer Bar Control

, 9 Dec 2008
A fully customizable WPF implementation of the left side pane that was introduced in Windows XP's Explorer.
XPlorerBar_demo.zip
XPlorerBar_demo
ZonaTools.XPlorerBar.DemoApp.exe
ZonaTools.XPlorerBar.dll
ZonaTools.XPlorerBar.Documentation.chm
XPlorerBar_src.zip
XPlorerBar_src
XPlorerBar.DemoApp
Converters
Extra_BindingMode
Extra_ThemeManagement
Images
codeproject120x60.gif
Computer16.png
Copy16.png
CreateFolder16.png
Delete16.png
MailFile16.png
Move16.png
MusicOnLine16.png
MyComputer16.png
MyDocuments16.png
MyMusic32.png
MyNetwork16.png
MyPictures16.png
MyPictures32.png
MyPictures48.png
NetworkFavorites16.png
OrderPictures16.png
PlayAll16.png
PrintPictures16.png
PublishFolder16.png
Rename16.png
SharedMusic16.png
ShareFolder16.png
SlideShow16.png
Properties
Settings.settings
Resources
Images
Folder16.png
MyComputer16.png
NetworkPlaces16.png
PicturePrint16.png
PictureTasks32.png
PictureTasksMono48.png
PrintsOnline16.png
SlideShow16.png
Skins
XPlorerBar.DemoApp.suo
XPlorerBar.Documentation
Help
Documentation.chm
LastBuild.log
XPlorerBarDocumentationProject.shfb
XPlorerBar.Library
Converters
Documents
ReleaseHistory.pdf
TestPlan.pdf
Implementation
Properties
Settings.settings
Themes
#region [       Copyright © 2008, Zona-Tools, all rights reserved.       ]
/*
 * 
    This source code is licensed under the Code Project Open License (CPOL).
    Check out http://www.codeproject.com/info/cpol10.aspx for further details.
 * 
*/
#endregion


#region [       Using namespaces       ]

using System.Windows;

#endregion


namespace ZonaTools.XPlorerBar
{
    /// <summary>
    /// Declares static resource keys for all the resources to share
    /// with another assembly.
    /// </summary>
    public static class XPlorerResourceKeys
    {
        #region [       XPlorerBar brushes       ]

        /// <summary>
        /// Gets the <c>XPlorerBarBackgroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerBarBackgroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerBarBackgroundBrushKey, "XPlorerBarBackgroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerBarBackgroundBrushKey = null;

        #endregion


        #region [       XPlorerSection content brushes       ]

        /// <summary>
        /// Gets the <c>XPlorerSectionContentBackgroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionContentBackgroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionContentBackgroundBrushKey, "XPlorerSectionContentBackgroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionContentBackgroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionContentForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionContentForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionContentForegroundBrushKey, "XPlorerSectionContentForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionContentForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionContentHoverForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionContentHoverForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionContentHoverForegroundBrushKey, "XPlorerSectionContentHoverForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionContentHoverForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionContentBorderBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionContentBorderBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionContentBorderBrushKey, "XPlorerSectionContentBorderBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionContentBorderBrushKey = null;

        #endregion


        #region [       XPlorerSection content brushes (IsPrimary = true)       ]

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryContentBackgroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryContentBackgroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryContentBackgroundBrushKey, "XPlorerSectionPrimaryContentBackgroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryContentBackgroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryContentForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryContentForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryContentForegroundBrushKey, "XPlorerSectionPrimaryContentForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryContentForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryContentHoverForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryContentHoverForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryContentHoverForegroundBrushKey, "XPlorerSectionPrimaryContentHoverForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryContentHoverForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryContentBorderBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryContentBorderBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryContentBorderBrushKey, "XPlorerSectionPrimaryContentBorderBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryContentBorderBrushKey = null;

        #endregion


        #region [       XPlorerSection header brushes       ]

        /// <summary>
        /// Gets the <c>XPlorerSectionHeaderBackgroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionHeaderBackgroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionHeaderBackgroundBrushKey, "XPlorerSectionHeaderBackgroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionHeaderBackgroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionHeaderForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionHeaderForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionHeaderForegroundBrushKey, "XPlorerSectionHeaderForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionHeaderForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionHeaderHoverForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionHeaderHoverForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionHeaderHoverForegroundBrushKey, "XPlorerSectionHeaderHoverForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionHeaderHoverForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionHeaderButtonBackgroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionHeaderButtonBackgroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionHeaderButtonBackgroundBrushKey, "XPlorerSectionHeaderButtonBackgroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionHeaderButtonBackgroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionHeaderButtonForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionHeaderButtonForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionHeaderButtonForegroundBrushKey, "XPlorerSectionHeaderButtonForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionHeaderButtonForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionHeaderButtonHoverForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionHeaderButtonHoverForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionHeaderButtonHoverForegroundBrushKey, "XPlorerSectionHeaderButtonHoverForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionHeaderButtonHoverForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionHeaderButtonBorderBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionHeaderButtonBorderBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionHeaderButtonBorderBrushKey, "XPlorerSectionHeaderButtonBorderBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionHeaderButtonBorderBrushKey = null;

        #endregion


        #region [       XPlorerSection header brushes (IsPrimary = true)       ]

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryHeaderBackgroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryHeaderBackgroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryHeaderBackgroundBrushKey, "XPlorerSectionPrimaryHeaderBackgroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryHeaderBackgroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryHeaderForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryHeaderForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryHeaderForegroundBrushKey, "XPlorerSectionPrimaryHeaderForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryHeaderForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryHeaderHoverForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryHeaderHoverForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryHeaderHoverForegroundBrushKey, "XPlorerSectionPrimaryHeaderHoverForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryHeaderHoverForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryHeaderButtonBackgroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryHeaderButtonBackgroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryHeaderButtonBackgroundBrushKey, "XPlorerSectionPrimaryHeaderButtonBackgroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryHeaderButtonBackgroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryHeaderButtonForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryHeaderButtonForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryHeaderButtonForegroundBrushKey, "XPlorerSectionPrimaryHeaderButtonForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryHeaderButtonForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryHeaderButtonHoverForegroundBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryHeaderButtonHoverForegroundBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryHeaderButtonHoverForegroundBrushKey, "XPlorerSectionPrimaryHeaderButtonHoverForegroundBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryHeaderButtonHoverForegroundBrushKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionPrimaryHeaderButtonBorderBrush</c> brush.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionPrimaryHeaderButtonBorderBrushKey
        {
            get { return GetRegisteredKey(_XPlorerSectionPrimaryHeaderButtonBorderBrushKey, "XPlorerSectionPrimaryHeaderButtonBorderBrush"); }
        }
        private static ComponentResourceKey _XPlorerSectionPrimaryHeaderButtonBorderBrushKey = null;

        #endregion


        #region [       XPlorerSection header styles       ]

        /// <summary>
        /// Gets the <c>XPlorerSectionHeaderStyle</c> style.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionHeaderStyleKey
        {
            get { return GetRegisteredKey(_XPlorerSectionHeaderStyleKey, "XPlorerSectionHeaderStyle"); }
        }
        private static ComponentResourceKey _XPlorerSectionHeaderStyleKey = null;

        #endregion


        #region [       XPlorerSection header arrows      ]

        /// <summary>
        /// Gets the <c>XPlorerSectionHeaderExpandArrows</c> geometry.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionHeaderExpandArrowsKey
        {
            get { return GetRegisteredKey(_XPlorerSectionHeaderExpandArrowsKey, "XPlorerSectionHeaderExpandArrows"); }
        }
        private static ComponentResourceKey _XPlorerSectionHeaderExpandArrowsKey = null;

        /// <summary>
        /// Gets the <c>XPlorerSectionHeaderCollapseArrows</c> geometry.
        /// </summary>
        public static ComponentResourceKey XPlorerSectionHeaderCollapseArrowsKey
        {
            get { return GetRegisteredKey(_XPlorerSectionHeaderCollapseArrowsKey, "XPlorerSectionHeaderCollapseArrows"); }
        }
        private static ComponentResourceKey _XPlorerSectionHeaderCollapseArrowsKey = null;
        
        #endregion


        #region [       Helpers       ]

        //===========================================================================
        /// <summary>
        /// Gets or creates the specified registered resource key of an element.
        /// </summary>
        /// <param name="resKey">Private resource key of the element.</param>
        /// <param name="resourceId">Resource name of the element.</param>
        /// <returns>Returns the public resource key of the specified element.</returns>
        //===========================================================================
        private static ComponentResourceKey GetRegisteredKey(ComponentResourceKey resKey, string resourceId)
        {
            if (resKey == null)
                resKey = new ComponentResourceKey(typeof(XPlorerResourceKeys), resourceId);

            return resKey;
        }

        #endregion

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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

Share

About the Author

Olivier Simon
Team Leader
France France
I have been developing and managing projects for real-time embedded softwares for eight years. Then, I moved from Paris to the south of France and began to lead a team who was developping Java applications.
 
My main occupation right now is to continue my journey in the WPF world.
 
You can check out my blog here. [^]

You may also be interested in...

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 9 Dec 2008
Article Copyright 2008 by Olivier Simon
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid