バージョン

Closing イベント

ContentPane が閉じられようとしているときに発生します。
シンタックス
'宣言
 
Public Event Closing As EventHandler(Of PaneClosingEventArgs)
public event EventHandler<PaneClosingEventArgs> Closing
イベント データ

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

プロパティ解説
Cancel Infragistics.Windows.Controls.Events.CancelableRoutedEventArgsから継承されます。 
Handled System.Windows.RoutedEventArgsから継承されます。Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
OriginalSource System.Windows.RoutedEventArgsから継承されます。Gets the original reporting source as determined by pure hit testing, before any possible System.Windows.RoutedEventArgs.Source adjustment by a parent class.
RoutedEvent System.Windows.RoutedEventArgsから継承されます。Gets or sets the System.Windows.RoutedEventArgs.RoutedEvent associated with this System.Windows.RoutedEventArgs instance.
Source System.Windows.RoutedEventArgsから継承されます。Gets or sets a reference to the object that raised the event.
使用例
Imports Infragistics.Windows.DockManager
Imports Infragistics.Windows.DockManager.Events

Private Sub ContentPane_Closing(ByVal sender As Object, ByVal e As PaneClosingEventArgs)
    Dim result As MessageBoxResult = MessageBox.Show(Me, "Can this pane be hidden?", "Close Pane", MessageBoxButton.YesNo, MessageBoxImage.Question)

    If MessageBoxResult.No = result Then
        e.Cancel = True
    End If
End Sub

Private Sub ContentPane_Closed(ByVal sender As Object, ByVal e As PaneClosedEventArgs)
    Dim cp As ContentPane = TryCast(e.OriginalSource, ContentPane)

    System.Diagnostics.Debug.WriteLine(cp.Header, "Closed")
End Sub

Private Sub InitializeDmClosePane(ByVal dockManager As XamDockManager)
    Dim split As New SplitPane()

    ' By default when a pane is closed, it 
    ' is just hidden. For some panes though 
    ' you may just want the pane to be removed. 
    ' The CloseAction can be used to control this. 
    Dim cpRemove As New ContentPane()
    cpRemove.CloseAction = PaneCloseAction.RemovePane
    cpRemove.Header = "Remove When Closed"
    split.Panes.Add(cpRemove)

    ' You can prevent a pane from being closed using 
    ' the AllowClose property. By default all panes 
    ' can be closed and when closed the Visibility 
    ' is changed to Collapsed. 
    Dim cpNever As New ContentPane()
    cpNever.AllowClose = False
    cpNever.Header = "Never Close"
    split.Panes.Add(cpNever)

    ' You can handle the Closing event to conditionally 
    ' prevent the pane from being closed. The Closed 
    ' event is fired after the pane has been closed 
    ' regardless of the CloseAction 
    Dim cpConditional As New ContentPane()
    cpConditional.Header = "Conditionally Close"
    AddHandler cpConditional.Closing, AddressOf Me.ContentPane_Closing
    AddHandler cpConditional.Closed, AddressOf Me.ContentPane_Closed
    split.Panes.Add(cpConditional)

    dockManager.Panes.Add(split)
End Sub
using Infragistics.Windows.DockManager;
using Infragistics.Windows.DockManager.Events;

private void ContentPane_Closing(object sender, PaneClosingEventArgs e)
{
	MessageBoxResult result = MessageBox.Show(this, "Can this pane be hidden?", 
		"Close Pane", MessageBoxButton.YesNo, MessageBoxImage.Question);

	if (MessageBoxResult.No == result)
	{
		e.Cancel = true;
	}
}

private void ContentPane_Closed(object sender, PaneClosedEventArgs e)
{
	ContentPane cp = e.OriginalSource as ContentPane;

	System.Diagnostics.Debug.WriteLine(cp.Header, "Closed");
} 

private void InitializeDmClosePane(XamDockManager dockManager)
{
	SplitPane split = new SplitPane();

	// By default when a pane is closed, it 
	// is just hidden. For some panes though
	// you may just want the pane to be removed. 
	// The CloseAction can be used to control this.
	ContentPane cpRemove = new ContentPane();
	cpRemove.CloseAction = PaneCloseAction.RemovePane;
	cpRemove.Header = "Remove When Closed";
	split.Panes.Add(cpRemove);

	// You can prevent a pane from being closed using
	// the AllowClose property. By default all panes
	// can be closed and when closed the Visibility
	// is changed to Collapsed.
	ContentPane cpNever = new ContentPane();
	cpNever.AllowClose = false;
	cpNever.Header = "Never Close";
	split.Panes.Add(cpNever);
	
	// You can handle the Closing event to conditionally 
	// prevent the pane from being closed. The Closed 
	// event is fired after the pane has been closed 
	// regardless of the CloseAction
	ContentPane cpConditional = new ContentPane();
	cpConditional.Header = "Conditionally Close";
	cpConditional.Closing += new EventHandler<PaneClosingEventArgs>(this.ContentPane_Closing);
	cpConditional.Closed += new EventHandler<PaneClosedEventArgs>(this.ContentPane_Closed);
	split.Panes.Add(cpConditional);

	dockManager.Panes.Add(split);
}
<igDock:XamDockManager>
    
<igDock:XamDockManager.Panes>
        
<igDock:SplitPane>
            
<!-- By default when a pane is closed, it 
                 is just hidden. For some panes though
                 you may just want the pane to be removed. 
                 The CloseAction can be used to control this.
            
-->
            
<igDock:ContentPane Header="Remove When Closed"
                                
CloseAction="RemovePane"/>

            
<!-- You can prevent a pane from being closed using
                 the AllowClose property. By default all panes
                 can be closed and when closed the Visibility
                 is changed to Collapsed. 
-->
            
<igDock:ContentPane Header="Never Close"
                                
AllowClose="False"/>
            
            
<!-- You can handle the Closing event to conditionally 
                 prevent the pane from being closed. The Closed 
                 event is fired after the pane has been closed 
                 regardless of the CloseAction. 
-->
            
<igDock:ContentPane Header="Conditionally Close"
                                
Closing="ContentPane_Closing"
                                
Closed="ContentPane_Closed"/>
        
</igDock:SplitPane>
    
</igDock:XamDockManager.Panes>
</igDock:XamDockManager>
参照