This is a migrated thread and some comments may be shown as answers.

TabStrip NULL exception

1 Answer 19 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 07 Mar 2014, 09:58 AM
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);

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 12 Mar 2014, 07:25 AM
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.

Regards,
George
Telerik

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

Tags
Dock
Asked by
Tim
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or