Class CalendarDayButton
Represents a day on a Calendar.
Inheritance
Inherited Members
Namespace: System.Windows.Controls.Primitives
Assembly: OpenSilver.dll
Syntax
public sealed class CalendarDayButton : Button
Constructors
| Improve this Doc View SourceCalendarDayButton()
Initializes a new instance of the CalendarDayButton class.
Declaration
public CalendarDayButton()
Methods
| Improve this Doc View SourceOnApplyTemplate()
Builds the visual tree for the CalendarDayButton when a new template is applied.
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourceOnCreateAutomationPeer()
Returns a CalendarDayButtonAutomationPeer for use by the Silverlight automation infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type | Description |
---|---|
AutomationPeer | CalendarDayButtonAutomationPeer for the Button object. |
Overrides
Remarks
This method creates a new CalendarDayButtonAutomationPeer instance if one has not been created for the CalendarButton; otherwise, it returns the CalendarDayButtonAutomationPeer previously created.
Classes that participate in the Silverlight automation infrastructure must implement this method to return a class-specific derived class of AutomationPeer that reports information for automation behavior.
OnMouseLeftButtonDown(MouseButtonEventArgs)
Provides class handling for the MouseLeftButtonDown event that occurs when the left mouse button is pressed while the mouse pointer is over this control.
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e | The event data. |
Overrides
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
Type | Condition |
---|---|
System.ArgumentNullException | e is a null reference (Nothing in Visual Basic). |
OnMouseLeftButtonUp(MouseButtonEventArgs)
Provides handling for the MouseLeftButtonUp event that occurs when the left mouse button is released while the mouse pointer is over this control.
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e | The event data. |
Overrides
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
Type | Condition |
---|---|
System.ArgumentNullException | e is a null reference (Nothing in Visual Basic). |
Events
| Improve this Doc View SourceCalendarDayButtonMouseDown
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.
Declaration
public event MouseButtonEventHandler CalendarDayButtonMouseDown
Event Type
Type | Description |
---|---|
MouseButtonEventHandler |
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).
Declaration
public event MouseButtonEventHandler CalendarDayButtonMouseUp
Event Type
Type | Description |
---|---|
MouseButtonEventHandler |