Version

BeforeShowFlyout Event

Occurs when the flyout is about to be displayed.
Syntax
'Declaration
 
Public Event BeforeShowFlyout As CancelableControlPaneEventHandler
public event CancelableControlPaneEventHandler BeforeShowFlyout
Event Data

The event handler receives an argument of type CancelableControlPaneEventArgs containing data related to this event. The following CancelableControlPaneEventArgs properties provide information specific to this event.

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs) 
Pane DockableControlPane instance associated with the event. This property is read-only.
Example
The following code uses demonstrates how to selectively prevent an unpinned DockableControlPane from being displayed.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDock

Private Sub ultraDockManager1_BeforeShowFlyout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDock.CancelableControlPaneEventArgs) Handles ultraDockManager1.BeforeShowFlyout

    ' BeforeShowFlyout is fired before an unpinned control pane is
    ' displayed in a flyout window.
    '

    ' Prevent flyouts docked to the top or bottom from flying out -
    ' get the associated DockArea and base it on its docked location
    Dim location As DockedLocation = e.Pane.DockAreaPane.DockedLocation

    If (location = DockedLocation.DockedBottom OrElse _
        location = DockedLocation.DockedTop) Then
        e.Cancel = True
    End If

End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinDock;
using System.Diagnostics;

private void ultraDockManager1_BeforeShowFlyout(object sender, Infragistics.Win.UltraWinDock.CancelableControlPaneEventArgs e)
{

	// BeforeShowFlyout is fired before an unpinned control pane is
	// displayed in a flyout window.
	//

	// Prevent flyouts docked to the top or bottom from flying out -
	// get the associated DockArea and base it on its docked location
	DockedLocation location = e.Pane.DockAreaPane.DockedLocation;

	if (location == DockedLocation.DockedBottom ||
		location == DockedLocation.DockedTop)
		e.Cancel = 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