다음을 통해 공유


DatePicker.CalendarClosed 이벤트

정의

드롭다운 Calendar가 닫힐 때 발생합니다.

public:
 event System::Windows::RoutedEventHandler ^ CalendarClosed;
public event System.Windows.RoutedEventHandler CalendarClosed;
member this.CalendarClosed : System.Windows.RoutedEventHandler 
Public Custom Event CalendarClosed As RoutedEventHandler 
Public Event CalendarClosed As RoutedEventHandler 

이벤트 유형

RoutedEventHandler

예제

다음 예제에서는 사용자를 만들고 DatePicker 지침을 제공합니다. 사용자가 열거나 닫으면 Calendar지침이 업데이트됩니다.

<StackPanel>
  <TextBlock Name="textBlock1" 
             Text="Enter a date or click the calendar."/>
  <DatePicker CalendarOpened="DatePicker_CalendarOpened"
              CalendarClosed="DatePicker_CalendarClosed"/>
</StackPanel>
private void DatePicker_CalendarOpened(object sender, RoutedEventArgs e)
{
    textBlock1.Text = "Select a date from the calendar";
}

private void DatePicker_CalendarClosed(object sender, RoutedEventArgs e)
{
    textBlock1.Text = "Enter a date or click the calendar";
}
Private Sub DatePicker_CalendarOpened(
             ByVal sender As System.Object,
             ByVal e As System.Windows.RoutedEventArgs)
    textBlock1.Text = "Select a date from the calendar"
End Sub

Private Sub DatePicker_CalendarClosed(
             ByVal sender As System.Object,
             ByVal e As System.Windows.RoutedEventArgs)
    textBlock1.Text = "Enter a date or click the calendar"
End Sub

설명

XAML 특성 사용

<DatePicker CalendarClosed="eventhandler"/>  

적용 대상