'Declaration Public Function PerformAction( _ ByVal actionCode As UltraPrintPreviewControlAction _ ) As Boolean
public bool PerformAction( UltraPrintPreviewControlAction actionCode )
PerformAction simulates user interaction with the control. Calling Peformaction will cause the control to behave as through the user performed the specified action. Any appropriate events will be called as if the user performed the action.
Private Sub PrintPreviewForm_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load ' When the Form first loads, there is no view history to navigate ' so both navigation buttons should be disabled. ' Me.btnNextPointInHistory.Enabled = False Me.btnPrevPointInHistory.Enabled = False End Sub Private Sub ultraPrintPreviewControl1_ViewHistoryChanged(sender As Object, e As System.EventArgs) Handles Me.ultraPrintPreviewControl1.ViewHistoryChanged ' After the view history has been navigated we need to update the Enabled state ' of both navigation buttons in case the user has reached the beginning or end of ' the view history. ' Me.btnNextPointInHistory.Enabled = Me.ultraPrintPreviewControl1.HasNextView Me.btnPrevPointInHistory.Enabled = Me.ultraPrintPreviewControl1.HasPreviousView End Sub Private Sub btnNextPointInHistory_Click(sender As Object, e As System.EventArgs) Handles Me.btnNextPointInHistory.Click ' Make the control display the point in the view history "after" the current view point. ' Me.ultraPrintPreviewControl1.PerformAction(Infragistics.Win.Printing.UltraPrintPreviewControlAction.NextView) End Sub Private Sub btnPrevPointInHistory_Click(sender As Object, e As System.EventArgs) Handles Me.btnPrevPointInHistory.Click ' Make the control display the point in the view history "before" the current view point. ' Me.ultraPrintPreviewControl1.PerformAction(Infragistics.Win.Printing.UltraPrintPreviewControlAction.PreviousView) End Sub
private void PrintPreviewForm_Load(object sender, System.EventArgs e) { // When the Form first loads, there is no view history to navigate // so both navigation buttons should be disabled. // this.btnNextPointInHistory.Enabled = false; this.btnPrevPointInHistory.Enabled = false; } private void ultraPrintPreviewControl1_ViewHistoryChanged(object sender, System.EventArgs e) { // After the view history has been navigated we need to update the Enabled state // of both navigation buttons in case the user has reached the beginning or end of // the view history. // this.btnNextPointInHistory.Enabled = this.ultraPrintPreviewControl1.HasNextView; this.btnPrevPointInHistory.Enabled = this.ultraPrintPreviewControl1.HasPreviousView; } private void btnNextPointInHistory_Click(object sender, System.EventArgs e) { // Make the control display the point in the view history "after" the current view point. // this.ultraPrintPreviewControl1.PerformAction( Infragistics.Win.Printing.UltraPrintPreviewControlAction.NextView ); } private void btnPrevPointInHistory_Click(object sender, System.EventArgs e) { // Make the control display the point in the view history "before" the current view point. // this.ultraPrintPreviewControl1.PerformAction( Infragistics.Win.Printing.UltraPrintPreviewControlAction.PreviousView ); }
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