バージョン

NavigationPaneFlyoutDisplaying イベント

ナビゲーション ペインが表示される前に発生します。
シンタックス
'宣言
 
Public Event NavigationPaneFlyoutDisplaying As NavigationPaneFlyoutDisplayingEventHandler
public event NavigationPaneFlyoutDisplayingEventHandler NavigationPaneFlyoutDisplaying
イベント データ

イベント ハンドラが、このイベントに関連するデータを含む、NavigationPaneFlyoutDisplayingEventArgs 型の引数を受け取りました。次の NavigationPaneFlyoutDisplayingEventArgs プロパティには、このイベントの固有の情報が記載されます。

プロパティ解説
Cancel System.ComponentModel.CancelEventArgsから継承されます。 
Height ナビゲーション ペイン フライアウトの高さを取得または設定します。
Left 画面座標で表されるナビゲーション ペイン フライアウトの場所の X 座標を取得または設定します。
PreferredLocation 画面座標で表されるナビゲーション ペイン フライアウトの場所を取得または設定します。
PreferredSize ナビゲーション ペイン フライアウトのサイズを取得または設定します。
Top 画面座標で表されるナビゲーション ペイン フライアウトの場所の Y 座標を取得または設定します。
Width ナビゲーション ペイン フライアウトの幅を取得または設定します。
解説

末端の開発者は、NavigationPaneFlyoutDisplayed イベントをキャンセルする (イベント引数の Cancel プロパティを True に設定する) ことによって、ナビゲーション ペインが表示されないようにすることができます。

使用例
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
using Infragistics.Win;
using Infragistics.Win.UltraWinExplorerBar;
using System.Diagnostics;


		//	Handles the Form's 'Load' event.
		private void Form1_Load(object sender, System.EventArgs e)
		{
			//	Hook the NavigationPaneFlyoutDisplaying event
			this.ultraExplorerBar1.NavigationPaneFlyoutDisplaying += new NavigationPaneFlyoutDisplayingEventHandler( this.ultraExplorerBar1_NavigationPaneFlyoutDisplaying );
		}

		//	Handles the ExplorerBar's 'NavigationPaneFlyoutDisplaying' event.
		private void ultraExplorerBar1_NavigationPaneFlyoutDisplaying( object sender, NavigationPaneFlyoutDisplayingEventArgs e )
		{
			UltraExplorerBar explorerBar = sender as UltraExplorerBar;

			//	Set the NavigationPaneFlyoutMaximumSize and NavigationPaneFlyoutMinimumSize
			//	properties to the same value, to prevent it from being resized.
			UIElement navigationCurrentGroupAreaUIElement = explorerBar.NavigationCurrentGroupAreaUIElement;
			int height = navigationCurrentGroupAreaUIElement != null ? navigationCurrentGroupAreaUIElement.Rect.Height : 0;
			int width = 200;
			Size flyoutSize = 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;
		}
参照