'宣言 Public Enum UltraTabControlEventId Inherits System.Enum
public enum UltraTabControlEventId : System.Enum
メンバ | 解説 |
---|---|
ActiveTabChanged | UltraTabControlBase.ActiveTabChanged イベントを識別するイベント ID。 |
ActiveTabChanging | UltraTabControlBase.ActiveTabChanging イベントを識別するイベント ID。 |
AfterNewTabButtonClicked | UltraTabControlBase.AfterNewTabButtonClicked イベントを識別するイベント ID。 |
BeforeNewTabButtonClicked | UltraTabControlBase.BeforeNewTabButtonClicked イベントを識別するイベント ID。 |
MouseEnterElement | Infragistics.Win.UltraComponentControlManagerBase.MouseEnterElement イベントを識別するイベント ID。 |
MouseLeaveElement | Infragistics.Win.UltraComponentControlManagerBase.MouseLeaveElement イベントを識別するイベント ID。 |
PerformedAction | UltraTabControlBase.PerformedAction イベントを識別するイベント ID。 |
PerformingAction | UltraTabControlBase.PerformingAction イベントを識別するイベント ID。 |
SelectedTabChanged | UltraTabControlBase.SelectedTabChanged イベントを識別するイベント ID。 |
SelectedTabChanging | UltraTabControlBase.SelectedTabChanging イベントを識別するイベント ID。 |
TabClosed | UltraTabControlBase.TabClosed イベントを識別するイベント ID。 |
TabClosing | UltraTabControlBase.TabClosing イベントを識別するイベント ID。 |
TabDataInitialized | UltraTabStripControl.TabDataInitialized イベントを識別するイベント ID。 |
TabMoved | UltraTabControlBase.TabMoved イベントを識別するイベント ID。 |
TabMoving | UltraTabControlBase.TabMoving イベントを識別するイベント ID。 |
TabPageResized | UltraTabControlBase.TabPageResized イベントを識別するイベント ID。 |
TabScrolled | UltraTabControlBase.TabScrolled イベントを識別するイベント ID。 |
TabScrolling | UltraTabControlBase.TabScrolling イベントを識別するイベント ID。 |
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTabs Imports Infragistics.Win.UltraWinTabControl Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Get the tab controls's event manager. ' The event manager is used to temporarily disable events ' to prevent them from being raised. This can be very ' convenient in a situation where one or more properties ' are being set in code and the events they would normally ' raise would cause unnecessary or counter-productive ' code to be executed. ' ' Note: All events are enabled by default. Dim eventManager As UltraTabControlEventManager eventManager = Me.ultraTabControl1.EventManager ' Disable the ActiveTabChanging\Changed and SelectedTabChanging\Changed events eventManager.SetEnabled(UltraTabControlEventId.ActiveTabChanging, False) eventManager.SetEnabled(UltraTabControlEventId.ActiveTabChanged, False) eventManager.SetEnabled(UltraTabControlEventId.SelectedTabChanging, False) eventManager.SetEnabled(UltraTabControlEventId.SelectedTabChanged, False) ' Call PerformAction to select the next tab. ' Note: This would normally cause the ActiveTabChanging\Changed ' and SelectedTabChanging\Changed events to be raised. ' However, since the above code disabled the events they won't be. Me.ultraTabControl1.PerformAction(UltraTabControlAction.SelectNextTab) ' Re-enable the events eventManager.SetEnabled(UltraTabControlEventId.ActiveTabChanging, True) eventManager.SetEnabled(UltraTabControlEventId.ActiveTabChanged, True) eventManager.SetEnabled(UltraTabControlEventId.SelectedTabChanging, True) eventManager.SetEnabled(UltraTabControlEventId.SelectedTabChanged, True) ' The 'AllEventsEnabled' property lets you enable/disable ' all events will a single line of code. If any event is ' disabled the 'AllEventsEnabled' property returns false. If eventManager.AllEventsEnabled = False Then eventManager.AllEventsEnabled = True End If ' The event manager also exposes an 'IsEnabled' method ' to see if an event is enabled or disbled. If eventManager.IsEnabled(UltraTabControlEventId.ActiveTabChanging) = False Then eventManager.SetEnabled(UltraTabControlEventId.ActiveTabChanging, True) End If ' The event manager also exposes overloaded ' 'IsEnabled' and 'SetEnabled' methods that take an ' event group so that, for example all 'Before' or all ' 'After' events can be enabled/disabled. If any event ' in the group is disabled the 'IsEnabled' method returns ' false. If eventManager.IsEnabled(UltraTabControlEventGroup.BeforeEvents) = False Then eventManager.SetEnabled(UltraTabControlEventGroup.BeforeEvents, True) End If eventManager.SetEnabled(UltraTabControlEventGroup.AfterEvents, True) ' The 'InProgress' method will return true if the ' specified event is currently being raised. This ' is often helpful in methods that can be called ' from various points in an application to determine ' what is triggering the call. If eventManager.InProgress(UltraTabControlEventId.SelectedTabChanging) = True Then ' ... End If End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinTabs; using Infragistics.Win.UltraWinTabControl; private void button1_Click(object sender, System.EventArgs e) { // Get the tab controls's event manager. // The event manager is used to temporarily disable events // to prevent them from being raised. This can be very // convenient in a situation where one or more properties // are being set in code and the events they would normally // raise would cause unnecessary or counter-productive // code to be executed. // // Note: All events are enabled by default. UltraTabControlEventManager eventManager = this.ultraTabControl1.EventManager; // Disable the ActiveTabChanging\Changed and SelectedTabChanging\Changed events eventManager.SetEnabled( UltraTabControlEventId.ActiveTabChanging, false ); eventManager.SetEnabled( UltraTabControlEventId.ActiveTabChanged, false ); eventManager.SetEnabled( UltraTabControlEventId.SelectedTabChanging, false ); eventManager.SetEnabled( UltraTabControlEventId.SelectedTabChanged, false ); // Call PerformAction to select the next tab. // Note: This would normally cause the ActiveTabChanging\Changed // and SelectedTabChanging\Changed events to be raised. // However, since the above code disabled the events they won't be. this.ultraTabControl1.PerformAction( UltraTabControlAction.SelectNextTab ); // Re-enable the events eventManager.SetEnabled( UltraTabControlEventId.ActiveTabChanging, true ); eventManager.SetEnabled( UltraTabControlEventId.ActiveTabChanged, true ); eventManager.SetEnabled( UltraTabControlEventId.SelectedTabChanging, true ); eventManager.SetEnabled( UltraTabControlEventId.SelectedTabChanged, true ); // The 'AllEventsEnabled' property lets you enable/disable // all events will a single line of code. If any event is // disabled the 'AllEventsEnabled' property returns false. if ( !eventManager.AllEventsEnabled ) eventManager.AllEventsEnabled = true; // The event manager also exposes an 'IsEnabled' method // to see if an event is enabled or disbled. if ( !eventManager.IsEnabled(UltraTabControlEventId.ActiveTabChanging ) ) eventManager.SetEnabled(UltraTabControlEventId.ActiveTabChanging, true ); // The event manager also exposes overloaded // 'IsEnabled' and 'SetEnabled' methods that take an // event group so that, for example all 'Before' or all // 'After' events can be enabled/disabled. If any event // in the group is disabled the 'IsEnabled' method returns // false. if ( !eventManager.IsEnabled(UltraTabControlEventGroup.BeforeEvents ) ) eventManager.SetEnabled(UltraTabControlEventGroup.BeforeEvents, true ); eventManager.SetEnabled(UltraTabControlEventGroup.AfterEvents, true ); // The 'InProgress' method will return true if the // specified event is currently being raised. This // is often helpful in methods that can be called // from various points in an application to determine // what is triggering the call. if ( eventManager.InProgress( UltraTabControlEventId.SelectedTabChanging ) ) { // ... } }