バージョン

BeforeDockChange イベント

ドッキング可能ペインがドラッグされるときに発生します。
シンタックス
'宣言
 
Public Event BeforeDockChange As BeforeDockChangeEventHandler
public event BeforeDockChangeEventHandler BeforeDockChange
イベント データ

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

プロパティ解説
Cancel System.ComponentModel.CancelEventArgsから継承されます。 
ChangeType 発生している変更のタイプを返します。
NewDockedLocation ペインの新しい DockedLocation を返します。
NewIndex 親ペイン内でのペインの新しいインデックスを返します。
Pane Infragistics.Win.UltraWinDock.CancelablePaneEventArgsから継承されます。イベントに関連付けられたDockablePaneBaseインスタンス。このプロパティは読み取り専用です。
Parent 親ペインを返します。
使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDock

Private Sub ultraDockManager1_BeforeDockChange(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDock.BeforeDockChangeEventArgs) Handles ultraDockManager1.BeforeDockChange

    ' The BeforeDockChange is invoked as a pane is dragged
    ' to allow you to determine whether a drop location is
    ' considered a valid drop point. Setting Cancel to
    ' true will indicate to the dock manager that the drop
    ' location is not valid. When this is done, the cursor
    ' is changed to the no cursor to indicate this to the user.
    ' If the mouse is released at that point, the drag is cancelled.
    '

    ' Only allow sliding group items to be repositioned
    ' within the parent
    If (e.ChangeType <> DockChangeType.SiblingPaneReposition AndAlso _
        Not e.Pane.Parent Is Nothing AndAlso _
        e.Pane.Parent.ChildPaneStyle = ChildPaneStyle.SlidingGroup) Then

        e.Cancel = True
    End If

    ' Any floating combination is allowed so just
    ' exit
    If (e.NewDockedLocation = DockedLocation.Floating) Then
        Return
    End If

    ' Do not allow panes to be grouped together
    If (e.ChangeType = DockChangeType.NewGroup OrElse _
        e.ChangeType = DockChangeType.NewSiblingPane) Then
        e.Cancel = True
    End If

    ' Do not allow any new docking areas to be created
    ' on the form - only floating docking areas
    If (e.ChangeType = DockChangeType.NewDockArea AndAlso _
        e.NewDockedLocation <> DockedLocation.Floating) Then
        e.Cancel = True
    End If

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


private void ultraDockManager1_BeforeDockChange(object sender, Infragistics.Win.UltraWinDock.BeforeDockChangeEventArgs e)
{

	// The BeforeDockChange is invoked as a pane is dragged
	// to allow you to determine whether a drop location is
	// considered a valid drop point. Setting Cancel to
	// true will indicate to the dock manager that the drop
	// location is not valid. When this is done, the cursor
	// is changed to the no cursor to indicate this to the user.
	// If the mouse is released at that point, the drag is cancelled.
	//

	// Only allow sliding group items to be repositioned
	// within the parent
	if (e.ChangeType != DockChangeType.SiblingPaneReposition &&
		e.Pane.Parent != null &&
		e.Pane.Parent.ChildPaneStyle == ChildPaneStyle.SlidingGroup)
		e.Cancel = true;

	// Any floating combination is allowed so just
	// exit
	if (e.NewDockedLocation == DockedLocation.Floating)
		return;

	// Do not allow panes to be grouped together
	if (e.ChangeType == DockChangeType.NewGroup ||
		e.ChangeType == DockChangeType.NewSiblingPane)
		e.Cancel = true;
	
	// Do not allow any new docking areas to be created
	// on the form - only floating docking areas
	if (e.ChangeType == DockChangeType.NewDockArea &&
		e.NewDockedLocation != DockedLocation.Floating)
		e.Cancel = true;

}
参照