- xplorerbar_src.zip
- XPlorerBar_src
- XPlorerBar.DemoApp.sln
- XPlorerBar.DemoApp.suo
- XPlorerBar.DemoApp
- App.xaml
- App.xaml.cs
- 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
- MainWindow.xaml
- MainWindow.xaml.cs
- Properties
- Resources
- Images
- Folder16.png
- MyComputer16.png
- NetworkPlaces16.png
- PicturePrint16.png
- PictureTasks32.png
- PictureTasksMono48.png
- PrintsOnline16.png
- SlideShow16.png
- Skins
- XPlorerBar.DemoApp.csproj
- XPlorerBar.Documentation
- Help
- Documentation.chm
- LastBuild.log
- XPlorerBarDocumentationProject.shfb
- XPlorerBar.Library
- xplorerbar_demo.zip
- XPlorerBar_demo
- ZonaTools.XPlorerBar.DemoApp.exe
- ZonaTools.XPlorerBar.dll
- ZonaTools.XPlorerBar.Documentation.chm
|
#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.ComponentModel;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
#endregion
namespace ZonaTools.XPlorerBar
{
/// <summary>
/// Represents a text associated with an image and a tag.
/// </summary>
public class XPlorerItem : ButtonBase
{
#region [ Constructor ]
//===========================================================================
/// <summary>
/// Static constructor used to override the dependency properties (if
/// needed) and define the default style for the control.
/// </summary>
//===========================================================================
static XPlorerItem()
{
//Provides a new default style for the XPlorerItem element
DefaultStyleKeyProperty.OverrideMetadata(typeof(XPlorerItem),
new FrameworkPropertyMetadata(typeof(XPlorerItem)));
}
#endregion
#region [ Dependency properties ]
#region ItemImage property
//===========================================================================
/// <summary>
/// Gets or sets the image source of the image to associate with the text.
/// This is a dependency property.
/// </summary>
/// <remarks>
/// The default value is <c>null</c>.
/// </remarks>
//===========================================================================
[Category(XPlorerBar.CATEGORYNAME), Browsable(true)]
public ImageSource ItemImage
{
get { return (ImageSource)GetValue(ItemImageProperty); }
set { SetValue(ItemImageProperty, value); }
}
/// <summary>
/// Identifies the <see cref="ItemImage"/> dependency property.
/// </summary>
public static readonly DependencyProperty ItemImageProperty =
DependencyProperty.Register("ItemImage",
typeof(ImageSource), typeof(XPlorerItem),
new PropertyMetadata(null));
#endregion
#region ItemText property
//===========================================================================
/// <summary>
/// Gets or sets the text to display.
/// This is a dependency property.
/// </summary>
/// <remarks>
/// The default value is <c>string.Empty</c>.
/// </remarks>
//===========================================================================
[Category(XPlorerBar.CATEGORYNAME), Browsable(true)]
public string ItemText
{
get { return (string)GetValue(ItemTextProperty); }
set { SetValue(ItemTextProperty, value); }
}
/// <summary>
/// Identifies the <see cref="ItemText"/> dependency property.
/// </summary>
public static readonly DependencyProperty ItemTextProperty =
DependencyProperty.Register("ItemText",
typeof(string), typeof(XPlorerItem),
new PropertyMetadata(string.Empty));
#endregion
#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.
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. [
^]