Hi,
I have a main docking manager and a nested docking manager within one of my docked windows.
Both are subscribed to DockingManager_WindowClosing.
When I close a main docking manager window that does not contain the nested docking manager, then DockingManager_WindowClosing fires off correctly. But when I try to close the docking window that contains the nested docking manager, OR I try to close one of the windows of the nested docking manager, the event doesn't fire off.
Am I doing something wrong here? Code is below and I attached an image.
MY XAML
<syncfusion:DockingManager x:Name="dockMgrMain"
Grid.Row="1"
WindowClosing="DockingManager_WindowClosing">
<ContentControl syncfusion:DockingManager.Header="Charts"
syncfusion:DockingManager.State="Document"
syncfusion:DockingManager.SideInDockedMode="Top"
x:Name="chartsWindow">
<syncfusion:DockingManager x:Name="dockMgrCharts"
WindowClosing="DockingManager_WindowClosing"/>
</ContentControl>
<ContentControl syncfusion:DockingManager.Header="Messages"
syncfusion:DockingManager.SideInDockedMode="Bottom">
<TextBox AcceptsReturn="True"
IsReadOnly="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Text="{Binding Path=MessageString, Mode=OneWay}"/>
</ContentControl>
<!--Hidden until needed-->
<ContentControl x:Name="tbImport"
syncfusion:DockingManager.Header="Import Tick Data"
syncfusion:DockingManager.State="Hidden"
syncfusion:DockingManager.SizetoContentInFloat="True"
syncfusion:DockingManager.CanResizeInFloatState="False"
>
<views:DataImportVw x:Name="dataImportVw"/>
</ContentControl>
</syncfusion:DockingManager>
MY HANDLER
private void DockingManager_WindowClosing(object sender, WindowClosingEventArgs e)
{
//reference the docking window, and do something
ContentControl window = (ContentControl)e.TargetItem;
}
Hi Lorenzo,
WindowClosing event of DockingManager will be fired whenever the child in Float, dock, AutoHidden widow are closing. It will not be triggered for the closing of DocumentWindow.
CloseButtonClick event will be triggered when closing the document window.
Please refer to the below documentation link for your reference.
Regards,
Gokul T.