'宣言 Public Event BeforeToggleDockState As CancelablePaneEventHandler
public event CancelablePaneEventHandler BeforeToggleDockState
イベント ハンドラが、このイベントに関連するデータを含む、CancelablePaneEventArgs 型の引数を受け取りました。次の CancelablePaneEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
Cancel System.ComponentModel.CancelEventArgsから継承されます。 | |
Pane | イベントに関連付けられたDockablePaneBaseインスタンス。このプロパティは読み取り専用です。 |
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDock Private Sub ultraDockManager1_BeforeToggleDockState(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDock.CancelablePaneEventArgs) Handles ultraDockManager1.BeforeToggleDockState ' The BeforeToggleDockState is invoked when the user ' double clicks on the caption or tab item for a pane ' but before the window has changed position from ' floating to docked (or vice versa). ' The Cancel parameter can be set to true to cancel ' the change. ' Assuming a structure of: ' DockArea1 ' Child1 ' Child2 ' DockArea2 ' Child3 ' With the following code, the user could double click ' on the caption of DockArea1, DockArea2, or Child3 ' to change they're state from floating to docked. ' ' Do not allow the members of a group to have their ' state toggled from docked to floating or floating ' to docked if the pane has siblings ' If (Not e.Pane.Parent Is Nothing AndAlso e.Pane.Parent.Panes.Count > 1) Then e.Cancel = True End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDock; using System.Diagnostics; private void ultraDockManager1_BeforeToggleDockState(object sender, Infragistics.Win.UltraWinDock.CancelablePaneEventArgs e) { // The BeforeToggleDockState is invoked when the user // double clicks on the caption or tab item for a pane // but before the window has changed position from // floating to docked (or vice versa). // The Cancel parameter can be set to true to cancel // the change. // Assuming a structure of: // DockArea1 // Child1 // Child2 // DockArea2 // Child3 // With the following code, the user could double click // on the caption of DockArea1, DockArea2, or Child3 // to change they're state from floating to docked. // // Do not allow the members of a group to have their // state toggled from docked to floating or floating // to docked if the pane has siblings // if (e.Pane.Parent != null && e.Pane.Parent.Panes.Count > 1) e.Cancel = true; }