'Declaration Public Overloads Function IsEnabled( _ ByVal group As DockManagerEventGroups _ ) As Boolean
public bool IsEnabled( DockManagerEventGroups group )
The EventManager is used to selectively enable and disable events for the control. This method will return True if the events in a group are enabled and the code in the events' procedures will be executed when the appropriate circumstances arise. If this method returns False, at least one event in the group is disabled.
UltraDockManager events are categorized into groups to simplify the enabling and disabling of blocks of related events.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDock Private Sub btnEventManager_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEventManager.Click ' Get the dockmanager components'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 DockEventManager ' The 'EventManager' property returns the instance ' used to manage the component event firing eventManager = Me.ultraDockManager1.EventManager ' Disable the BeforeToggleDockState event eventManager.SetEnabled(DockManagerEventIds.BeforeToggleDockState, False) ' There is also an overload to disable a group of events ' for example, you can disable all the 'Before' events ' eventManager.SetEnabled(DockManagerEventGroups.BeforeEvents, True) ' Call the ToggleDockState of the pane to toggle its 'DockedState' ' Note: This would normally cause the 'BeforeToggleDockState' event to ' be raised. However, since the above code disabled the event ' it won't be. Me.ultraDockManager1.DockAreas(0).ToggleDockState() ' Re-enable the BeforeToggleDockState event eventManager.SetEnabled(DockManagerEventIds.BeforeToggleDockState, 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 Not eventManager.AllEventsEnabled Then eventManager.AllEventsEnabled = True End If ' The event manager also exposes an 'IsEnabled' method ' to see if an event is enabled or disbled. If Not eventManager.IsEnabled(DockManagerEventIds.BeforeSplitterDrag) Then eventManager.SetEnabled(DockManagerEventIds.BeforeSplitterDrag, True) End If ' 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(DockManagerEventIds.PaneActivate) Then ' ... End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDock; using System.Diagnostics; private void btnEventManager_Click(object sender, System.EventArgs e) { // Get the dockmanager components'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. // The 'EventManager'property returns the instance // used to manage the component event firing DockEventManager eventManager = this.ultraDockManager1.EventManager; // Disable the BeforeToggleDockState event eventManager.SetEnabled(DockManagerEventIds.BeforeToggleDockState, false); // there is also an overload to disable a group of events // for example, you can disable all the 'Before' events // eventManager.SetEnabled(DockManagerEventGroups.BeforeEvents, True) // Call the ToggleDockState of the pane to toggle its 'DockedState' // Note: This would normally cause the 'BeforeToggleDockState' event to // be raised. However, since the above code disabled the event // it won't be. this.ultraDockManager1.DockAreas[0].ToggleDockState(); // Re-enable the BeforeToggleDockState event eventManager.SetEnabled(DockManagerEventIds.BeforeToggleDockState, 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(DockManagerEventIds.BeforeSplitterDrag)) eventManager.SetEnabled(DockManagerEventIds.BeforeSplitterDrag, 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(DockManagerEventIds.PaneActivate)) { // ... } }
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