ComponentOne Menus and Toolbars for WinForms
C1.Win.C1Command.4.5.2 Assembly / C1.Win.C1Command Namespace / C1DockingManager Class / Dragged Event
Example

In This Topic
    Dragged Event (C1DockingManager)
    In This Topic
    Occurs after C1DockingTab or C1DockingTabPage is dragged.
    Syntax
    'Declaration
     
    Public Event Dragged As System.EventHandler(Of DraggedEventArgs)
    public event System.EventHandler<DraggedEventArgs> Dragged
    Event Data

    The event handler receives an argument of type DraggedEventArgs containing data related to this event. The following DraggedEventArgs properties provide information specific to this event.

    PropertyDescription
    The command dock that the C1DockingTab or C1DockingTabPage were dragged to.  
    The docking tab that was dragged.  
    The command dock from which the C1DockingTab or C1DockingTabPage were dragged.  
    Example
    You can change size DragSizingMode value here, depending on your needs. Which will allow you to enable or disable automatic resizing whenever you need it. Or you can manually set the value for the dragged control.
    private void c1DockingManager1_Dragged(object sender, DraggedEventArgs e)
    {
        switch(e.DockingTab.Dock)
        {
             case DockStyle.Left:
             case DockStyle.Right:
                 c1DockingManager1.DragSizingMode = ResizingMode.Proportional;
                 break;
             case DockStyle.Top:
             case DockStyle.Bottom:
                 c1DockingManager1.DragSizingMode = ResizingMode.Default;
                 e.DockingTab.Height = 100;
                 break;
             default:
                 c1DockingManager1.DragSizingMode = ResizingMode.Default;
                 break;
        }
    }
    Requirements

    Target Platforms: 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

    See Also