Version

PerformAction(UltraWeekViewAction,Boolean,Boolean) Method

Simulates user interactivity with the UltraWeekView control.
Syntax
'Declaration
 
Public Overloads Overridable Function PerformAction( _
   ByVal actionCode As UltraWeekViewAction, _
   ByVal shift As Boolean, _
   ByVal control As Boolean _
) As Boolean
public virtual bool PerformAction( 
   UltraWeekViewAction actionCode,
   bool shift,
   bool control
)

Parameters

actionCode
The Infragistics.Win.UltraWinSchedule.WeekView.UltraWeekViewAction that identifies the action to be performed
shift
If true, the action will be performed as if the SHIFT key was pressed
control
If true, the action will be performed as if the CTRL key was pressed

Return Value

true if the action completed successfully, false if the action failed.
Remarks

The PerformAction method is used by the UltraWeekView control whenever a keystroke that has a mapping in the control's KeyActionMappings table is received.

When the keystroke is received, the control attempts to perform the action associated with that keystroke, determining whether it can do so by reading the control's CurrentState property.

Note: In addition to being used internally by the control, the PerformAction method is exposed so that it can be used to programmatically simulate user interactivity with the control.

For an example of how the KeyActionMappings table, the PerformAction method, and the CurrentState property work in conjunction with each other, see the KeyActionMappings topic.

Example
Uses the PerformAction method to programmatically activate the previous visible, enabled day without selecting it.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.WeekView

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        '----------------------------------------------------------------------------------------------------
        '	Uses the PerformAction method to programmatically activate the previous visible, enabled day
        '	without selecting it.
        '----------------------------------------------------------------------------------------------------

        '	Call the PerformAction method with the actionCode, 'PreviousDay' specify true for
        '	the 'control' parameter, which simulates holding the Control key down while
        '	performing the action. This will result in the previous visible, enabled day becoming
        '	the new ActiveDay. Since the action is being performed as if the Control key is down,
        '	the selected state of any days affected by the action will not change.
        Me.ultraWeekView.PerformAction(UltraWeekViewAction.PreviousDay, False, True)

    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using Infragistics.Win.UltraWinSchedule.WeekView;
using System.Diagnostics;

		private void button1_Click(object sender, System.EventArgs e)
		{

			//----------------------------------------------------------------------------------------------------
			//	Uses the PerformAction method to programmatically activate the previous visible, enabled day
			//	without selecting it.
			//----------------------------------------------------------------------------------------------------
		
			//	Call the PerformAction method with the actionCode, 'PreviousDay'; specify true for
			//	the 'control' parameter, which simulates holding the Control key down while
			//	performing the action. This will result in the previous visible, enabled day becoming
			//	the new ActiveDay. Since the action is being performed as if the Control key is down,
			//	the selected state of any days affected by the action will not change.
			this.ultraWeekView.PerformAction( UltraWeekViewAction.PreviousDay, false, true );
		
		}
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