'Declaration Public ReadOnly Property Pane As DockablePaneBase
public DockablePaneBase Pane {get;}
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDock Private Sub ultraDockManager1_BeforePaneButtonClick(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDock.CancelablePaneButtonEventArgs) Handles ultraDockManager1.BeforePaneButtonClick ' The BeforePaneButtonClick event is invoked when the ' user clicks a pane caption button but before the ' associated action is invoked. The Button parameter ' of the event args indicates the button that was clicked. ' The associated action may be prevented by setting the ' Cancel parameter to false. ' ' You can prevent a pane button's action from being invoked ' by setting the cancel parameter to true. ' If (e.Button = PaneButton.Close) Then Dim dr As DialogResult = MessageBox.Show(Me, _ "Are you sure you want to close this pane?", _ Application.ProductName, _ MessageBoxButtons.YesNo, _ MessageBoxIcon.Question) If (dr = DialogResult.No) Then e.Cancel = True End If End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDock; using System.Diagnostics; private void ultraDockManager1_BeforePaneButtonClick(object sender, Infragistics.Win.UltraWinDock.CancelablePaneButtonEventArgs e) { // The BeforePaneButtonClick event is invoked when the // user clicks a pane caption button but before the // associated action is invoked. The Button parameter // of the event args indicates the button that was clicked. // The associated action may be prevented by setting the // Cancel parameter to false. // // You can prevent a pane button's action from being invoked // by setting the cancel parameter to true. // if (e.Button == PaneButton.Close) { DialogResult dr = MessageBox.Show(this, "Are you sure you want to close this pane?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr == DialogResult.No) e.Cancel = true; } }
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