How to position the C1DockTabItem to center of the screen when it is Flaoting

Posted by: rambabu on 19 May 2023, 6:30 am EST

    • Post Options:
    • Link

    Posted 19 May 2023, 6:30 am EST

    Hello,

    Please let me know how to position the C1DockTabItem to the center of the screen when it is in a Floating state.

    C1.WPF.Docking.4, Version=4.0.20192.658

  • Posted 21 May 2023, 10:53 pm EST - Updated 21 May 2023, 10:58 pm EST

    Hi Rambabu,

    By default, each C1DockTabControl in the C1Docking library is set to the “Docked” mode. You can create a floating C1DockTabControl in two ways:

    1. Drag and drop the tab control: When you drag and drop the tab control, the window will be rendered at the dropped location.

    2. Set the DockingMode using the arrow button on the tab control header (refer to the attached “mode.png” image): In this case, the window will be rendered at the default location set.

    The windows created in these floating scenarios are of type WPFWindow. In WPF, you can only set the startup location of a window. However in the above cases, setting the startup location does not affect the location of the window because the windows can only be fetched after they have already been rendered.

    Setting the startup location of a floating window will only have an effect when the DockMode of the C1DockTabControl is initially set to “Floating”. This allows fetching the floating windows when the C1DockTabControl is loaded. We have provided a sample application (DockFloatCenter.zip) demonstrating this case.

    In case you have any further concerns, please explain your use case scenario to us so that we can assist you further accordingly.

    Thanks & Regards,

    Aastha

  • Posted 9 June 2023, 1:12 am EST

    Thank you, the solution worked fine.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels