Dock Tab Control throw an exeption

Originally Posted 19 April 2016, 1:02 am EST

  • Originally Posted 19 April 2016, 1:02 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???
  • Reply

    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
  • Reply

    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
  • Reply

    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
  • Reply

    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!
  • Reply

    Hello,
    I have same problem here. Any solution ?
  • Reply

    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
  • Reply

    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
  • Marked as Answer

    Reply

    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
  • Reply

    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