Class CalendarButton
- Namespace
- Avalonia.Controls.Primitives
- Assembly
- Avalonia.Controls.dll
Represents a button on a Calendar.
[PseudoClasses(new string[] { ":selected", ":inactive", ":btnfocused" })]
public sealed class CalendarButton : Button, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, ICommandSource
- Inheritance
-
CalendarButton
- Implements
- Inherited Members
- Extension Methods
Constructors
CalendarButton()
Initializes a new instance of the CalendarButton class.
public CalendarButton()
Methods
OnApplyTemplate(TemplateAppliedEventArgs)
Builds the visual tree for the System.Windows.Controls.Primitives.CalendarButton when a new template is applied.
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
Parameters
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
PointerPressedEventArgsThe 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
PointerReleasedEventArgsThe 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
CalendarLeftMouseButtonDown
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>? CalendarLeftMouseButtonDown
Event Type
CalendarLeftMouseButtonUp
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>? CalendarLeftMouseButtonUp