|
//Handle Close Button event
this.dockingManager1.CaptionButtons[0].Click += Form1_Click;
private void Form1_Click(object sender, CancelEventArgs e)
{
//Click Close Button in DockingManager, it shows the below message
MessageBox.Show("Selected Form will Close");
} |
|
private void DockingManager1_DockVisibilityChanged(object sender, DockVisibilityChangedEventArgs arg)
{
//GetDockVisibility method gives the detail of the docked control visibility
if (this.dockingManager1.GetDockVisibility(arg.Control) == false)
{
//DockVisibilityChangedEventArgs instance arg holds the control being changed the visibility
MessageBox.Show(this.dockingManager1.GetDockLabel(arg.Control) + " " + " window is closed.");
}
} |
|
private void DockingManager1_DockContextMenu(object sender, DockContextMenuEventArgs arg)
{
BarItem item = arg.ContextMenu.ParentBarItem.Items[4] as BarItem;
if(item != null && item.Text == "&Hide")
{
arg.ContextMenu.ParentBarItem.Items.Remove(item);
}
} |