How to disable Left and right key events on the ComponentOne DockControl .net 6

Posted by: rambabu on 2 March 2024, 5:57 pm EST

  • Posted 2 March 2024, 5:57 pm EST

    Hello,

    I am looking for a way to disable the left and right key event actions on the window dock control to move between tabs in .net 6.0. can you please help provide a solution to it?

    Thanks & Regards

    Teja Gudivada

  • Posted 4 March 2024, 2:49 am EST

    Hi Teja,

    As per our understanding of your use-case, you want to prevent any action when keyboard’s left or right arrow key is pressed in C1DockControl. In order to achieve this requirement, you can handle C1DockControl’s PreviewKeyDown event as shown in the following code snippet:

    private void dockControl_PreviewKeyDown(object sender, KeyEventArgs e)
    {
        if(e.Key == Key.Left || e.Key == Key.Right)
        {
            e.Handled = true;
        }
    }

    Refer DockKeyDisable.zip for implementation.

    In case your requirement differs from our understanding, please provide us with more details regarding the same.

    Thanks & Regards,

    Aastha

  • Posted 5 March 2024, 5:05 pm EST

    Hello Asha,

    The issue I am facing is I am loading an external URL in the C1DockTabControl in DockControl and when I try to use the left/right key to move through the text, it is not allowing me to do it, instead, it is switching the tabs.

    please refer to the attached video.

    https://www.awesomescreenshot.com/video/25545480?key=1978568742872532d8de78deac33df54

  • Posted 6 March 2024, 5:35 am EST

    Hi Teja,

    Based on the video provided by you, it seems that you are using a TextBox control inside a C1DockTabControl. While writing inside the textbox, if you press left/right arrow you, the dock tab gets switched. We created a sample application based on this scenario but could not replicate the issue on our end. Refer DockKeyDisable_Mod.zip

    It seems that the issue is particular to your project implement. Therefore, we request you update the attached sample or provide a stripped-down version of your sample application that replicates this behavior. This will help us analyze your issue in a better way and provide a more specific solution.

    Thanks & Regards,

    Aastha

  • Posted 7 March 2024, 5:44 pm EST

    Hello Aastha,

    I am using a webview2 control inside the DockTabItem, with the regular text box controls it is working as expected.

    Attached a copy of the project, please check and let me know.

    https://www.awesomescreenshot.com/video/25620271?key=fe33095c7673eca91ab1b3f1d0733255

    DockKeyDisable.zip

  • Posted 8 March 2024, 3:15 am EST

    Hi Teja,

    Thanks for providing the sample application.

    The behavior shown by the project sample is not the desired one. We are in discussions with the developers regarding this issue. [Internal Tracking ID: C1XAML-35775]

    We will update you on this as soon as we hear back from them.

    Thanks & Regards,

    Aastha

  • Posted 15 March 2024, 4:55 pm EST

    Hello Aastha, Is there any update on this issue?

    please let me know.

  • Posted 18 March 2024, 4:24 am EST

    Hi Teja,

    The developers have identified this issue as a bug. Unfortunately, we don’t have a workaround for this now.

    The ETA for the fix of this issue is 2024v1. We will keep you posted with the further updates regarding this.

    Thanks & Regards,

    Aastha

  • Posted 5 April 2024, 9:28 am EST

    Hello Aastha,

    do you know when the 2024V1 will be released, please let us know.

    Thanks & Regards

  • Posted 8 April 2024, 2:10 am EST

    Hi,

    The 2024v1 build is expected to be released by July, 2024. We request you wait for the release to be publicly available in order to get the resolution of the issue.

    Thanks & Regards,

    Aastha

  • Posted 26 June 2024, 2:20 am EST

    Hi,

    This issue has been fixed in the latest build 2024v1.

    We kindly request you update your controls to the latest build version 8.0.20241.795, in order to achieve the desired behavior.

    Thanks & Regards,

    Aastha

Need extra support?

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

Learn More

Forum Channels