sourcecode.zip
Outlook2010TaskButton
_ReSharper.Outlook2010TaskButton
BuildScriptCache
.crc
.version
1
4aa16a7f.dat
CachesImage.bin
DecompilerCache
ModuleIds.xml
NamedArguments
.crc
.version
1
4aa16a7f.dat
PdbInfo
ProjectModel
ProjectModel.dat
Resources
.crc
.version
1
4aa16a7f.dat
SymbolCache.bin
TagPrefixes
.crc
.version
TodoCache
.crc
.version
1
4aa16a7f.dat
WebsiteFileReferences
.crc
.version
WordIndex.New
.version
0
2671708a.dat
8
WordIndex
.crc
.version
1
4aa16a7f.dat
Xaml
CacheProvider.dat
_UpgradeReport_Files
Outlook2010TaskButton.4.5.resharper.user
Outlook2010TaskButton.5.1.ReSharper.user
Outlook2010TaskButton.sln
Outlook2010TaskButton.suo
Outlook2010TaskButton
TaskButtonDemo
UpgradeLog.XML
Outlook2010TaskButtonPart2.zip
CachesImage.bin
ProjectModel.dat
.version
8
wpfcustomcontrolpart2.zip
CachesImage.bin
ProjectModel.dat
.version
7
|
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace Outlook2010TaskButton
{
/// <summary>
/// An Outlook 2010 Task Button.
/// </summary>
public class TaskButton : RadioButton
{
#region Fields
// Dependency property backing variables
public static readonly DependencyProperty ImageProperty;
public static readonly DependencyProperty TextProperty;
#endregion
#region Constructors
/// <summary>
/// Default constructor.
/// </summary>
static TaskButton()
{
// Initialize as lookless control
DefaultStyleKeyProperty.OverrideMetadata(typeof(TaskButton), new FrameworkPropertyMetadata(typeof(TaskButton)));
// Initialize dependency properties
ImageProperty = DependencyProperty.Register("Image", typeof(ImageSource), typeof(TaskButton), new UIPropertyMetadata(null));
TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(TaskButton), new UIPropertyMetadata(null));
}
#endregion
#region Custom Control Properties
/// <summary>
/// The image displayed by the button.
/// </summary>
/// <remarks>The image is specified in XAML as an absolute or relative path.</remarks>
[Description("The image displayed by the button"), Category("Common Properties")]
public ImageSource Image
{
get { return (ImageSource)GetValue(ImageProperty); }
set { SetValue(ImageProperty, value); }
}
/// <summary>
/// The text displayed by the button.
/// </summary>
[Description("The text displayed by the button."), Category("Common Properties")]
public string Text
{
get { return (string)GetValue(TextProperty); }
set { SetValue(TextProperty, value); }
}
#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.
David Veeneman is a financial planner and software developer. He is the author of "The Fortune in Your Future" (McGraw-Hill 1998). His company, Foresight Systems, develops planning and financial software.