イベント ハンドラが、このイベントに関連するデータを含む、CalendarCellBeginEditEventArgs 型の引数を受け取りました。次の CalendarCellBeginEditEventArgs プロパティには、このイベントの固有の情報が記載されます。
次のサンプルコードは、タッチデバイスでセルが編集モードになったときにタッチキーボードを表示する方法を示します。このサンプルコードは、
CurrentCellPositionChanging イベントに示されている詳細なコード例の一部を抜粋したものです。
void gcCalendarGrid_CellBeginEdit(object sender, CalendarCellBeginEditEventArgs e)
{
if (GetMessageDeviceType() == MessageDeviceType.Touch
&& (e.CellPosition.Scope == CalendarTableScope.Content && e.CellPosition.RowIndex == 1 && e.CellPosition.ColumnIndex == 0))
{
gcCalendarGrid.ShowTouchKeyboard();
}
}
Private Sub gcCalendarGrid_CellBeginEdit(sender As Object, e As CalendarCellBeginEditEventArgs)
If GetMessageDeviceType() = MessageDeviceType.Touch AndAlso (e.CellPosition.Scope = CalendarTableScope.Content AndAlso e.CellPosition.RowIndex = 1 AndAlso e.CellPosition.ColumnIndex = 0) Then
gcCalendarGrid.ShowTouchKeyboard()
End If
End Sub