バージョン

KeyActionMappings プロパティ (UltraTimelineView)

UltraTimelineView コントロールのキーボード動作を定義する UltraTimelineViewKeyActionMapping オブジェクトのコレクションを返します。
シンタックス
'宣言
 
Public ReadOnly Property KeyActionMappings As UltraTimelineViewKeyActionMappings
public UltraTimelineViewKeyActionMappings KeyActionMappings {get;}
解説

次の表は、UltraTimelineView コントロールのデフォルトのキーマッピングをリストしたものです。

KeyCode ActionCode StateRequired StateDisallowed SpecialKeysRequired SpecialKeysDisallowed
Home FirstVisibleOwner MultipleOwners AppointmentEditing Ctrl AltShift
End LastVisibleOwner MultipleOwners AppointmentEditing Ctrl AltShift
Up PreviousVisibleOwner MultipleOwners AppointmentEditing 0 すべて
Down NextVisibleOwner MultipleOwners AppointmentEditing 0 すべて
Next PageDown NonVisibleOwners AppointmentEditing 0 すべて
PageUp PageUp NonVisibleOwners AppointmentEditing 0 すべて
Home SelectDateTimeRangeFirst なし ActivitySelected 0 すべて
End SelectDateTimeRangeLast なし ActivitySelected 0 すべて
SelectDateTimeRangePrevious DateTimeRangeSelected ActivitySelected 0 すべて
SelectDateTimeRangePreviousFromActivity ActivitySelected AppointmentEditing, DateTimeRangeSelected 0 すべて
SelectDateTimeRangeNextFromActivity ActivitySelected AppointmentEditing, DateTimeRangeSelected 0 すべて
SelectDateTimeRangeNext DateTimeRangeSelected ActivitySelected 0 すべて
ExtendSelectedDateTimeRangeBackward DateTimeRangeSelected ActivitySelected Shift AltCtrl
ExtendSelectedDateTimeRangeForward DateTimeRangeSelected ActivitySelected Shift AltCtrl
Return AutoCreateAppointment DateTimeRangeSelected, AutoAppointmentCreate ActivitySelected, ActiveOwnerLocked 0 すべて
Space AutoCreateAppointment DateTimeRangeSelected, AutoAppointmentCreate ActivitySelected, ActiveOwnerLocked 0 すべて
F2 EnterEditMode SingleAppointmentSelected AppointmentEditing, ActiveOwnerLocked 0 すべて
Return ExitEditModeSave AppointmentEditing なし 0 すべて
F2 ExitEditModeSave AppointmentEditing なし 0 すべて
Esc ExitEditModeCancel AppointmentEditing なし 0 すべて
削除 DeleteSelectedAppointments OnlyAppointmentsSelected AppointmentEditing 0 すべて
Tab SelectNextActivity TabKeyNavigatesNext AppointmentEditing 0 すべて
Tab SelectPreviousActivity TabKeyNavigatesPrevious AppointmentEditing Shift AltCtrl
Tab SelectFirstActivity TabKeyNavigatesNext AppointmentEditing, ActivitySelected 0 すべて
Tab SelectLastActivity TabKeyNavigatesPrevious AppointmentEditing, ActivitySelected Shift AltCtrl
ScrollHorizontalForward なし AppointmentEditing Ctrl AltShift
ScrollHorizontalBackward なし AppointmentEditing Ctrl AltShift
Up ScrollVerticalUp なし AppointmentEditing Ctrl AltShift
Down ScrollVerticalDown なし AppointmentEditing Ctrl AltShift

リストのほとんどのアクションは、 PerformAction メソッドを使用して実行することができます。注: ただし、コントロールは対応するキー操作にリストされた同じステートの状態に一致する必要があります。

使用例
Imports System.Collections.Generic
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.Diagnostics

    Public Sub EnableHorizontalPaging(ByVal control As UltraTimelineView)

        '  Remove each default key action that is mapped to the PageUp or PageDown keys
        Dim forRemoval As List(Of UltraTimelineViewKeyActionMapping) = New List(Of UltraTimelineViewKeyActionMapping)()

        Dim keyMappings As UltraTimelineViewKeyActionMappings = control.KeyActionMappings
        For Each mapping As UltraTimelineViewKeyActionMapping In keyMappings
            If mapping.KeyCode = Keys.PageUp Or mapping.KeyCode = Keys.PageDown Then forRemoval.Add(mapping)
        Next

        For Each mapping As UltraTimelineViewKeyActionMapping In forRemoval
            keyMappings.Remove(mapping)
        Next

        '  Create a mapping that navigates to the next day disallow the
        '  'AppointmentEditing' state so the action is not performed when
        '  an edit mode session is in progress.
        Dim nextDay As UltraTimelineViewKeyActionMapping = _
            New UltraTimelineViewKeyActionMapping( _
                Keys.PageDown, _
                UltraTimelineViewAction.ScrollToNextDay, _
                UltraTimelineViewState.AppointmentEditing, _
                UltraTimelineViewState.None, _
                0, _
                0)

        '  Also create a mapping that navigates to the previous day.
        Dim prevDay As UltraTimelineViewKeyActionMapping = _
            New UltraTimelineViewKeyActionMapping( _
                Keys.PageUp, _
                UltraTimelineViewAction.ScrollToNextDay, _
                UltraTimelineViewState.AppointmentEditing, _
                UltraTimelineViewState.None, _
                0, _
                0)

        '  Add the custom mappings.
        keyMappings.Add(nextDay)
        keyMappings.Add(prevDay)

    End Sub
using System.Collections.Generic;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;

    public void EnableHorizontalPaging( UltraTimelineView control )
    {
        //  Remove each default key action that is mapped to the PageUp or PageDown keys
        List<UltraTimelineViewKeyActionMapping> forRemoval = new List<UltraTimelineViewKeyActionMapping>();
        UltraTimelineViewKeyActionMappings keyMappings = control.KeyActionMappings;
        foreach( UltraTimelineViewKeyActionMapping mapping in keyMappings )
        {
            if ( mapping.KeyCode == Keys.PageUp || mapping.KeyCode == Keys.PageDown )
                forRemoval.Add( mapping );
        }
        
        foreach( UltraTimelineViewKeyActionMapping mapping in keyMappings )
        {
            keyMappings.Remove( mapping );
        }

        //  Create a mapping that navigates to the next day; disallow the
        //  'AppointmentEditing' state so the action is not performed when
        //  an edit mode session is in progress.
        UltraTimelineViewKeyActionMapping nextDay =
            new UltraTimelineViewKeyActionMapping(
                Keys.PageDown,
                UltraTimelineViewAction.ScrollToNextDay,
                UltraTimelineViewState.AppointmentEditing,
                UltraTimelineViewState.None,
                0,
                0 );

        //  Also create a mapping that navigates to the previous day.
        UltraTimelineViewKeyActionMapping prevDay =
            new UltraTimelineViewKeyActionMapping(
                Keys.PageUp,
                UltraTimelineViewAction.ScrollToNextDay,
                UltraTimelineViewState.AppointmentEditing,
                UltraTimelineViewState.None,
                0,
                0 );

        //  Add the custom mappings.
        keyMappings.Add( nextDay );
        keyMappings.Add( prevDay );

    }
参照