In This Article

MonthCalendarItem Class

Represents a month calendar item.

[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
[TemplateVisualState(Name = "PointerOver", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Pressed", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Focused", GroupName = "FocusStates")]
[TemplateVisualState(Name = "Unfocused", GroupName = "FocusStates")]
[TemplateVisualState(Name = "Selected", GroupName = "SelectionStates")]
[TemplateVisualState(Name = "SelectedPointerOver", GroupName = "SelectionStates")]
[TemplateVisualState(Name = "Unselected", GroupName = "SelectionStates")]
[TemplateVisualState(Name = "Active", GroupName = "ActiveStates")]
[TemplateVisualState(Name = "Inactive", GroupName = "ActiveStates")]
[TemplateVisualState(Name = "ContainsToday", GroupName = "ContainsTodayStates")]
[TemplateVisualState(Name = "ExcludesToday", GroupName = "ContainsTodayStates")]
public class MonthCalendarItem : ContentControl, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control ContentControl Object

Constructors

MonthCalendarItem()

Initializes a new instance of the MonthCalendarItem class.

public MonthCalendarItem()

Properties

Command

Gets or sets the ICommand to execute when the item is tapped.

public ICommand Command { get; set; }

Property Value

ICommand:

The ICommand to execute when the item is tapped.

CommandParameter

Gets or sets the ICommand parameter to pass when the item is tapped.

public object CommandParameter { get; set; }

Property Value

Object:

The ICommand parameter to pass when the item is tapped.

ContainsToday

Gets or sets a value indicating whether the item contains DateTime.Today.

public bool ContainsToday { get; set; }

Property Value

Boolean:

true if the item contains DateTime.Today; otherwise false. The default value is false.

Date

Gets the date associated with this item.

public DateTime? Date { get; }

Property Value

Nullable<DateTime>:

The date associated with this item.

IsHeader

Gets or sets whether the item is a header and shouldn't show visual state highlights.

public bool IsHeader { get; set; }

Property Value

Boolean:

true if the item is a header and shouldn't show visual state highlights; otherwise, false. The default value is false.

IsInactive

Gets or sets whether the item is outside of the active view.

public bool IsInactive { get; set; }

Property Value

Boolean:

true if the item is outside of the active view; otherwise, false. The default value is false.

IsPressed

Gets whether the item is pressed.

public bool IsPressed { get; }

Property Value

Boolean:

true if the item is pressed; otherwise, false. The default value is false.

IsSelected

Gets or sets whether the item is selected.

public bool IsSelected { get; set; }

Property Value

Boolean:

true if the item is selected; otherwise, false. The default value is false.

Methods

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

OnGotFocus(RoutedEventArgs)

Occurs when the control gains focus.

protected override void OnGotFocus(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The RoutedEventArgs that contains the event data.

OnKeyDown(KeyEventArgs)

Occurs when a key is pressed.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The KeyEventArgs that contains the event data.

OnLostFocus(RoutedEventArgs)

Occurs when the control loses focus.

protected override void OnLostFocus(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The RoutedEventArgs that contains the event data.

Fields

CommandParameterProperty

Identifies the CommandParameter dependency property. This field is read-only.

public static readonly DependencyProperty CommandParameterProperty

CommandProperty

Identifies the Command dependency property. This field is read-only.

public static readonly DependencyProperty CommandProperty

ContainsTodayProperty

Identifies the ContainsToday dependency property. This field is read-only.

public static readonly DependencyProperty ContainsTodayProperty

IsHeaderProperty

Identifies the IsHeader dependency property. This field is read-only.

public static readonly DependencyProperty IsHeaderProperty

IsInactiveProperty

Identifies the IsInactive dependency property. This field is read-only.

public static readonly DependencyProperty IsInactiveProperty

IsPressedProperty

Identifies the IsPressed dependency property. This field is read-only.

public static readonly DependencyProperty IsPressedProperty

IsSelectedProperty

Identifies the IsSelected dependency property. This field is read-only.

public static readonly DependencyProperty IsSelectedProperty

Inherited Members

Extension Methods