Export (0) Print
Expand All

DatePicker.CalendarOpened Event

Occurs when the drop-down Calendar is opened.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls (in System.Windows.Controls.dll)

public event RoutedEventHandler CalendarOpened
<sdk:DatePicker CalendarOpened="eventhandler"/>

The following code contains two event handlers, which update a TextBlock when the Calendar is opened or closed. This example is part of a larger example available in the DatePicker overview.


//Simple event handlers that updates a TextBlock when 
//the drop-down calendar is opened or closed.
void dp1_CalendarOpened(object sender, RoutedEventArgs e)
{
    text1.Text = "DatePicker Calendar opened!";
}
void dp1_CalendarClosed(object sender, RoutedEventArgs e)
{
    text1.Text = "DatePicker Calendar closed!";
}


Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft