TabStrip NULL exception

2 posts, 0 answers
  1. Tim
    Tim avatar
    3 posts
    Member since:
    Feb 2009

    Posted 07 Mar 2014 Link to this post

    I have some code which creates a new tool window, sets it's size and docks it.  Unfortunately the TabStrip property is always null. Why is this?  All the sample code I've found in the documentation seems to do exactly what I am trying to do.

    var tw = new ToolWindow { Name = title };
    var strip = (DockTabStrip)tw.TabStrip;
    strip.SizeInfo.SizeMode = SplitPanelSizeMode.Absolute;
    strip.SizeInfo.AbsoluteSize = new Size((int)width,
    mainDock.DockWindow(tw, DockPosition.Left);
  2. George
    George avatar
    500 posts

    Posted 12 Mar 2014 Link to this post

    Hi Tim,

    Thank you for contacting us.

    Since the TabStrip is actually the Parent of the ToolWindow it cannot have a TabStrip when it is just instantiated. You must first add it to the RadDock instance:
    var tw = new ToolWindow() { Name = "NAME "} ;
    this.RadDock.DockWindow(tw, DockPosition.Left);
    var strip = tw.TabStrip;

    Let me know if you have further questions.


    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  3. DevCraft banner
Back to Top