次の方法で共有


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 

イベントの種類

次の例では、 を 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"/>  

適用対象