Version

PerformAction(UltraMonthViewSingleAction,Boolean,Boolean) Method

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

Parameters

actionCode
The Infragistics.Win.UltraWinSchedule.MonthViewSingle.UltraMonthViewSingleAction 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 UltraMonthViewSingle 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 control's PerformAction method to programmatically activate the next visible, enabled day without selecting it.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.MonthViewSingle

    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 next visible, enabled day
        '	without selecting it.
        '----------------------------------------------------------------------------------------------------

        '	Call the PerformAction method with the actionCode, 'NextDay'; specify true for
        '	the 'control' parameter, which simulates holding the Control key down while
        '	performing the action. This will result in the next 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.ultraMonthViewSingle1.PerformAction(UltraMonthViewSingleAction.NextDay, False, True)

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

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

			//----------------------------------------------------------------------------------------------------
			//	Uses the PerformAction method to programmatically activate the next visible, enabled day
			//	without selecting it.
			//----------------------------------------------------------------------------------------------------
		
			//	Call the PerformAction method with the actionCode, 'NextDay'; specify true for
			//	the 'control' parameter, which simulates holding the Control key down while
			//	performing the action. This will result in the next 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.ultraMonthViewSingle1.PerformAction( UltraMonthViewSingleAction.NextDay, 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