Version

PerformAction(ScrollBarAction,Boolean,Boolean) Method

Performs the action specified based on the key state provided.
Syntax
'Declaration
 
Public Overloads Overridable Function PerformAction( _
   ByVal actionCode As ScrollBarAction, _
   ByVal shift As Boolean, _
   ByVal control As Boolean _
) As Boolean
public virtual bool PerformAction( 
   ScrollBarAction actionCode,
   bool shift,
   bool control
)

Parameters

actionCode
Enumeration indicating the action to take.
shift
Indicates if the shift key is depressed
control
Indicates if the control key is depressed

Return Value

A boolean indicating if the action was performed.
Example
The following sample code illustrates how to use the CurrentState property and the PerformAction method.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinScrollBar

Private Sub button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button4.Click

    Dim state As ScrollBarState

    ' Get the current state of the scrollbar
    state = Me.ultraScrollBar1.CurrentState

    ' Check the state bit flags to see if the 'ThumbDrag' 
    ' bit is set
    If (state And ScrollBarState.ThumbDrag) = 0 Then

        ' Since the user isn't dragging the thumb 
        ' call PerformAction to go to the Minimum value
        ' if it is already at the maximum value. 
        ' Otherwise go to the maximum draggable value.
        If Me.ultraScrollBar1.Value = Me.ultraScrollBar1.MaximumDragValue Then
            Me.ultraScrollBar1.PerformAction(ScrollBarAction.First)
        Else
            Me.ultraScrollBar1.PerformAction(ScrollBarAction.Last)
        End If
    End If

End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinScrollBar;

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

	// Get the current state of the scrollbar
	ScrollBarState state = this.ultraScrollBar1.CurrentState;

	// Check the state bit flags to see if the 'ThumbDrag' 
	// bit is set
	if ( ( state & ScrollBarState.ThumbDrag ) == 0 )
	{
		// Since the user isn't dragging the thumb 
		// call PerformAction to go to the Minimum value
		// if it is already at the maximum value. 
		// Otherwise go to the maximum draggable value.
		if (this.ultraScrollBar1.Value == this.ultraScrollBar1.MaximumDragValue )
			this.ultraScrollBar1.PerformAction( ScrollBarAction.First );
		else
			this.ultraScrollBar1.PerformAction( ScrollBarAction.Last );
	}

}
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