C# Класс WinRTXamlToolkit.Controls.Primitives.CalendarDayButton

Наследование: Windows.UI.Xaml.Controls.Button
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ChangeVisualState void
IgnoreMouseOverState void
OnLoad void
SendPointerReleased void

Открытые методы

Метод Описание
CalendarDayButton ( ) : System

Initializes a new instance of the T:WinRTXamlToolkit.Controls.Primitives.CalendarDayButton class.

Защищенные методы

Метод Описание
OnApplyTemplate ( ) : void

Builds the visual tree for the T:WinRTXamlToolkit.Controls.Primitives.CalendarDayButton when a new template is applied.

OnCreateAutomationPeer ( ) : AutomationPeer

Returns a CalendarDayButtonAutomationPeer for use by the Silverlight automation infrastructure.

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.

OnPointerPressed ( PointerRoutedEventArgs e ) : void

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

This method marks the MouseLeftButtonDown event as handled by setting the PointerRoutedEventArgs.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.

OnPointerReleased ( PointerRoutedEventArgs e ) : void

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

This method marks the PointerReleased event as handled by setting the PointerRoutedEventArgs.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 PointerReleased event as handled in some situations, you should use the Click event instead to detect a button click.

Приватные методы

Метод Описание
ChangeVisualState ( bool useTransitions ) : void

Change to the correct visual state for the button.

IgnoreMouseOverState ( ) : void

Ensure the button is not in the MouseOver state.

If a button is in the MouseOver state when a Popup is closed (as is the case when you select a date in the DatePicker control), it will continue to think it's in the mouse over state even when the Popup opens again and it's not. This method is used to forcibly clear the state by changing the CommonStates state group.

OnLoad ( object sender, RoutedEventArgs e ) : void

Handle the Loaded event.

SendPointerReleased ( PointerRoutedEventArgs e ) : void

We need to simulate the PointerReleased event for the CalendarDayButton that stays in Pressed state after MouseCapture is released since there is no actual PointerReleased event for the release.

Описание методов

CalendarDayButton() публичный Метод

Initializes a new instance of the T:WinRTXamlToolkit.Controls.Primitives.CalendarDayButton class.
public CalendarDayButton ( ) : System
Результат System

OnApplyTemplate() защищенный Метод

Builds the visual tree for the T:WinRTXamlToolkit.Controls.Primitives.CalendarDayButton when a new template is applied.
protected OnApplyTemplate ( ) : void
Результат void

OnCreateAutomationPeer() защищенный Метод

Returns a CalendarDayButtonAutomationPeer for use by the Silverlight automation infrastructure.

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.

protected OnCreateAutomationPeer ( ) : AutomationPeer
Результат Windows.UI.Xaml.Automation.Peers.AutomationPeer

OnPointerPressed() защищенный Метод

Provides class handling for the MouseLeftButtonDown event that occurs when the left mouse button is pressed while the mouse pointer is over this control.
This method marks the MouseLeftButtonDown event as handled by setting the PointerRoutedEventArgs.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.
/// e is a null reference (Nothing in Visual Basic). ///
protected OnPointerPressed ( PointerRoutedEventArgs e ) : void
e Windows.UI.Xaml.Input.PointerRoutedEventArgs The event data.
Результат void

OnPointerReleased() защищенный Метод

Provides handling for the PointerReleased event that occurs when the left mouse button is released while the mouse pointer is over this control.
This method marks the PointerReleased event as handled by setting the PointerRoutedEventArgs.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 PointerReleased event as handled in some situations, you should use the Click event instead to detect a button click.
/// e is a null reference (Nothing in Visual Basic). ///
protected OnPointerReleased ( PointerRoutedEventArgs e ) : void
e Windows.UI.Xaml.Input.PointerRoutedEventArgs The event data.
Результат void