Class CalendarButton
Represents a button on a Calendar.
Inheritance
Inherited Members
Namespace: System.Windows.Controls.Primitives
Assembly: OpenSilver.Controls.dll
Syntax
public sealed class CalendarButton : Button, IControl, IFrameworkElement, IUIElement, IDependencyObject
Constructors
| Improve this Doc View SourceCalendarButton()
Initializes a new instance of the CalendarButton class.
Declaration
public CalendarButton()
Methods
| Improve this Doc View SourceOnApplyTemplate()
Builds the visual tree for the CalendarButton when a new template is applied.
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourceOnCreateAutomationPeer()
Returns a CalendarButtonAutomationPeer for use by the Silverlight automation infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type | Description |
---|---|
AutomationPeer | CalendarButtonAutomationPeer for the Button object. |
Overrides
Remarks
This method creates a new CalendarButtonAutomationPeer instance if one has not been created for the CalendarButton; otherwise, it returns the CalendarButtonAutomationPeer 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 SourceCalendarButtonMouseDown
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 CalendarButtonMouseDown
Event Type
Type | Description |
---|---|
MouseButtonEventHandler |
CalendarButtonMouseUp
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 CalendarButtonMouseUp
Event Type
Type | Description |
---|---|
MouseButtonEventHandler |