Table of Contents

Class CalendarDayButton

Namespace
Avalonia.Controls.Primitives
Assembly
Avalonia.Controls.dll
[PseudoClasses(new string[] { ":pressed", ":disabled", ":selected", ":inactive", ":today", ":blackout", ":dayfocused" })]
public sealed class CalendarDayButton : Button, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, ICommandSource
Inheritance
CalendarDayButton
Implements
Inherited Members
Extension Methods

Constructors

CalendarDayButton()

Initializes a new instance of the CalendarDayButton class.

public CalendarDayButton()

Methods

OnApplyTemplate(TemplateAppliedEventArgs)

Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.

protected override void OnApplyTemplate(TemplateAppliedEventArgs e)

Parameters

e TemplateAppliedEventArgs

The event args.

OnPointerPressed(PointerPressedEventArgs)

Provides class handling for the MouseLeftButtonDown event that occurs when the left mouse button is pressed while the mouse pointer is over this control.

protected override void OnPointerPressed(PointerPressedEventArgs e)

Parameters

e PointerPressedEventArgs

The event data.

Remarks

This method marks the MouseLeftButtonDown event as handled by setting the MouseButtonEventArgs.Handled property of the event data to true when the button is enabled and its ClickMode is not set to Hover. Since this method marks the MouseLeftButtonDown event as handled in some situations, you should use the Click event instead to detect a button click.

Exceptions

ArgumentNullException

e is a null reference (Nothing in Visual Basic).

OnPointerReleased(PointerReleasedEventArgs)

Provides handling for the MouseLeftButtonUp event that occurs when the left mouse button is released while the mouse pointer is over this control.

protected override void OnPointerReleased(PointerReleasedEventArgs e)

Parameters

e PointerReleasedEventArgs

The event data.

Remarks

This method marks the MouseLeftButtonUp event as handled by setting the MouseButtonEventArgs.Handled property of the event data to true when the button is enabled and its ClickMode is not set to Hover. Since this method marks the MouseLeftButtonUp event as handled in some situations, you should use the Click event instead to detect a button click.

Exceptions

ArgumentNullException

e is a null reference (Nothing in Visual Basic).

Events

CalendarDayButtonMouseDown

Occurs when the left mouse button is pressed (or when the tip of the stylus touches the tablet PC) while the mouse pointer is over a UIElement.

public event EventHandler<PointerPressedEventArgs>? CalendarDayButtonMouseDown

Event Type

EventHandler<PointerPressedEventArgs>

CalendarDayButtonMouseUp

Occurs when the left mouse button is released (or the tip of the stylus is removed from the tablet PC) while the mouse (or the stylus) is over a UIElement (or while a UIElement holds mouse capture).

public event EventHandler<PointerReleasedEventArgs>? CalendarDayButtonMouseUp

Event Type

EventHandler<PointerReleasedEventArgs>