Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar
' Handles the Form's 'Load' event
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Hook the NavigationPaneFlyoutDisplaying event
AddHandler Me.ultraExplorerBar1.NavigationPaneFlyoutDisplaying, AddressOf Me.ultraExplorerBar1_NavigationPaneFlyoutDisplaying
End Sub
' Handles the ExplorerBar's 'NavigationPaneFlyoutDisplaying' event.
Private Sub ultraExplorerBar1_NavigationPaneFlyoutDisplaying(ByVal sender As Object, ByVal e As NavigationPaneFlyoutDisplayingEventArgs)
Dim explorerBar As UltraExplorerBar = sender
' Set the NavigationPaneFlyoutMaximumSize and NavigationPaneFlyoutMinimumSize
' properties to the same value, to prevent it from being resized.
Dim navigationCurrentGroupAreaUIElement As UIElement = explorerBar.NavigationCurrentGroupAreaUIElement
Dim height As Integer = IIf(Not navigationCurrentGroupAreaUIElement Is Nothing, navigationCurrentGroupAreaUIElement.Rect.Height, 0)
Dim width As Integer = 200
Dim flyoutSize As Size = New Size(width, height)
explorerBar.NavigationPaneFlyoutMaximumSize = flyoutSize
explorerBar.NavigationPaneFlyoutMinimumSize = flyoutSize
' Set the PreferredSize property of the event arguments to that size as well.
e.PreferredSize = flyoutSize
End Sub