Version

ActionCode Property (UltraTimelineViewKeyActionMapping)

Returns the UltraTimelineViewAction constant that identifies the action for this instance.
Syntax
'Declaration
 
Public Shadows Property ActionCode As UltraTimelineViewAction
public new UltraTimelineViewAction ActionCode {get; set;}
Example
The following code sample demonstrates how to use the KeyActionMappings collection to customize keyboard behavior for the UltraTimelineView control:

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 );

    }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also