Dock Tab Control throw an exeption

Posted by: tehil121gmail-com on 19 September 2017, 2:09 am EST

    • Post Options:
    • Link

    Posted 19 September 2017, 2:09 am EST

    Hello,

    I have a problem and I don’t know how to solve it.

    I use your DockTabControl. the ItemSource attribute is binding to a list in the ViewModel and I define how to show the header by DataTemplate for the ItemTemplate attribute and how to show the content with DataTemplate for the ContentTemplate attribute.

    It works very nicely but in runtime when I press on the tabs and try to dock them, it throw an NullReferenceException- “object reference not set to an instance of an object”

    How can I solve it???

  • Posted 19 September 2017, 2:09 am EST

    Hello,

    Could you please share a stripped down sample replicating the issue so that I can debug the exact issue at my end and can assist you accordingly.

    Regards,

    Prashant

  • Posted 19 September 2017, 2:09 am EST

    hello

    I attached a simple sample for show the problem.

    run it and try to dock the tabs and then you’ll get the exeption

    I wait for a sulation.

    2016/05/c1DockTabControl.zip

  • Posted 19 September 2017, 2:09 am EST

    Hello,

    Please find the attached modified sample implementing your requirements and let me know in case of any doubts or queries.

    Regards,

    Prashant

    2016/05/Modified.zip

  • Posted 19 September 2017, 2:09 am EST

    Ok, in the modified sample it doesn’t throw an exeption but when I run it I can’t dock the tabs

    can I change it then I can dock them without an exeption???

    Thank you!

  • Posted 5 August 2020, 11:12 pm EST

    Hello,

    I have same problem here. Any solution ?

  • Posted 6 August 2020, 8:13 pm EST

    Hello,

    Please set the ShowHeader property to True on the C1DockTabControl and see if it works for you.

    Please find attached modified application.

    Regards,

    Ruchir

    c1DockTabControl_Modified.zip

  • Posted 6 August 2020, 8:32 pm EST

    Hi,

    First of all, thanks for the response and help.

    I saw the attached code but the problem still there. With ShowHeader now i can dock all the DockTabControl, but still can’t to float a single tab of the DockTabControl that is what i need.

    If i write this tabs as static in xaml file, it works perfect, but when i change it to a binding, loose the float single tab functionallity.

    It is posible to do this with DockTabControl and ItemSource binding ?

    Best regards

    Fernando

  • Posted 9 August 2020, 10:18 pm EST

    Hi Fernando,

    This is similar to the issue you posted on another forum post: https://www.grapecity.com/forums/wpf-edition/problem-with-docktabcontro

    So, it’s requested that you continue the discussion over there.

    Regards,

    Ruchir

  • Posted 10 August 2020, 6:11 pm EST

    Hi Ruchir,

    Ok, I saw it. Thanks for all help.

    Regards,

    Fernando

Need extra support?

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

Learn More

Forum Channels