- vhdatepicker.zip
- vhCalendar
- vhCalendar
- vhDatePicker.sln
- vhDatePicker
- vhDatePicker
- vhDatePickerHarness
- App.xaml
- App.xaml.cs
- bin
- Debug
- Release
- vhCalendar.dll
- vhCalendar.pdb
- vhDatePicker.dll
- vhDatePicker.pdb
- vhDatePickerHarness.exe
- vhDatePickerHarness.pdb
- Brushes.Aero.xaml
- CustomTheme
- obj
- Debug
- App.g.cs
- Custom Theme
- CustomTheme
- BlackMamba.baml
- BlackMamba.Style.baml
- CustomTheme.baml
- CustomTheme.Style.baml
- Refactor
- ResolveAssemblyReference.cache
- TempPE
- Properties.Resources.Designer.cs.dll
- vhDatePickerHarness.csproj.FileListAbsolute.txt
- vhDatePickerHarness.csproj.GenerateResource.Cache
- vhDatePickerHarness.exe
- vhDatePickerHarness.g.resources
- vhDatePickerHarness.pdb
- vhDatePickerHarness.Properties.Resources.resources
- vhDatePickerHarness_MarkupCompile.cache
- Window1.baml
- Window1.g.cs
- Release
- App.g.cs
- CustomTheme
- BlackMamba.baml
- BlackMamba.Style.baml
- CustomTheme.baml
- CustomTheme.Style.baml
- ResolveAssemblyReference.cache
- vhDatePickerHarness.csproj.FileListAbsolute.txt
- vhDatePickerHarness.csproj.GenerateResource.Cache
- vhDatePickerHarness.exe
- vhDatePickerHarness.g.resources
- vhDatePickerHarness.pdb
- vhDatePickerHarness.Properties.Resources.resources
- vhDatePickerHarness_MarkupCompile.cache
- Window1.baml
- Window1.g.cs
- Properties
- vhDatePickerHarness.csproj
- vhDatePickerHarness.csproj.user
- vhDatePickerHarness.suo
- Window1.xaml
- Window1.xaml.cs
- vhCalendar.zip
|
#region Directives
using System.Windows;
using System.Windows.Controls;
#endregion
namespace vhCalendar
{
public sealed class DateButton : Button
{
#region Constructor
static DateButton()
{
PropertyMetadata isSelectedMetaData = new PropertyMetadata
{
DefaultValue = false,
};
IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(DateButton), isSelectedMetaData);
PropertyMetadata isTodaysDateMetaData = new PropertyMetadata
{
DefaultValue = false,
};
IsTodaysDateProperty = DependencyProperty.Register("IsTodaysDate", typeof(bool), typeof(DateButton), isTodaysDateMetaData);
PropertyMetadata isBlackOutMetadata = new PropertyMetadata
{
DefaultValue = false,
};
IsBlackOutProperty = DependencyProperty.Register("IsBlackOut", typeof(bool), typeof(DateButton), isBlackOutMetadata);
PropertyMetadata isCurrentMonthMetaData = new PropertyMetadata
{
DefaultValue = true,
};
IsCurrentMonthProperty = DependencyProperty.Register("IsCurrentMonth", typeof(bool), typeof(DateButton), isCurrentMonthMetaData);
}
#endregion
#region DisplayDateStart
/// <summary>
/// Gets/Sets the minimum date that is displayed and selected
/// </summary>
public static readonly DependencyProperty IsSelectedProperty;
public bool IsSelected
{
get { return (bool)GetValue(IsSelectedProperty); }
set { SetValue(IsSelectedProperty, value); }
}
#endregion
#region IsBlackOut
/// <summary>
/// Gets/Sets button is blacked out
/// </summary>
public static readonly DependencyProperty IsBlackOutProperty;
public bool IsBlackOut
{
get { return (bool)GetValue(IsBlackOutProperty); }
set { SetValue(IsBlackOutProperty, value); }
}
#endregion
#region IsCurrentMonth
/// <summary>
/// Gets/Sets button is a member of current month
/// </summary>
public static readonly DependencyProperty IsCurrentMonthProperty;
public bool IsCurrentMonth
{
get { return (bool)GetValue(IsCurrentMonthProperty); }
set { SetValue(IsCurrentMonthProperty, value); }
}
#endregion
#region IsTodaysDate
/// <summary>
/// Gets/Sets todays date selection
/// </summary>
public static readonly DependencyProperty IsTodaysDateProperty;
public bool IsTodaysDate
{
get { return (bool)GetValue(IsTodaysDateProperty); }
set { SetValue(IsTodaysDateProperty, 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.
Network and programming specialist. Started in C, and have learned about 14 languages since then. Cisco programmer, and lately writing a lot of C# and WPF code, (learning Java too). If I can dream it up, I can probably put it to code. My software company, (VTDev), is on the verge of releasing a couple of very cool things.. keep you posted.