Posted 17 July 2026, 1:44 pm EST - Updated 17 July 2026, 2:05 pm EST
I’ve had many post this week or so diagnosing issues in my transition from the C1’s .NET Framework build to their .NET package from v5.6.20251.877 to v9.0.20251.1133. This is the last issue I have to resolve before finalizing this transition!
In short, I am trying to setup an XElement to serve as the default/initial state of our app to mimic the picture below:
Our app has a main shell with some fixed areas, but most of the app is one big C1DockControl.
In our old setup using the .NET Framework build we have a DefaultProject.json layout that we load when starting a new project and it looked like this:
{
"dockControl": {
"dockTabControl": [
{
"@Dock": "Left",
"@DockWidth": "45",
"@DockMode": "Docked"
},
{
"@Dock": "Right",
"@DockWidth": "45",
"@DockMode": "Hidden"
},
{
"@Dock": "Top",
"@DockHeight": "30",
"@DockWidth": "100",
"@DockMode": "Hidden"
},
{
"@Dock": "Bottom",
"@DockHeight": "80",
"@DockWidth": "100",
"@DockMode": "Hidden"
}
]
}
}
We would deserialize this to an XElement and call docker.Load(xElement) which gives us DockTabControl 1 through 4. Then once that loads and some other stuff in our app finishes initializing, we open some startup tools to DockTabControl1 (which is why it isn’t hidden by default), then we add DockTabControl5 manually and set its content to our apps main control by essentially just doing this:
var centerDock = new C1DockTabControl();
centerDock.Items.Add(mainControl);
docker.Items.Add(centerDock);
So, this would give us 5 C1DockTabControls in total on startup with 3 of them still hidden. The idea is these DockTabControls are hidden but predefined to serve as initial states for our various tools. We have numerous tools in our app and we set their initial launch location to Top, Bottom, Left, or Right. We then ‘unhide’ the DockControl if it was hidden and then add the tool as a new DockTabItem. The setup follows that the center DockTabControl 5 fills all the empty space while the 4 DockTabControls surrounding it have a small initial width/height. Most of the screen is taken up by DockTabControl5.
We have saved ‘projects’ for our app in which we save the state of the dock. When you start a brand new ‘project’ in our app it loads our default layout (DefaultProject.json), otherwise we load the existing layout from the saved file.
I honestly don’t know how this worked in the old version of C1. I think we just got lucky that it just so happened to work how we wanted? In the updated version of C1 the center DockTabControl5 is now really tiny. It seems that DockTabControl3 is filling all the vertical space in the center of the app and DockTabControl4 is filling all the horizontal space to the right of the app.
This was resulting in an initial layout that looked like this:
I’ve been playing around with the JSON to get a default setup that works, but I just can’t work it out. I tried setting up the DockTabControl5 that gets added on startup to have HorizontalFill and VerticalFill set to true, but this breaks when resizing tabs. For example, if I start resizing DockTabControl1 then DockTabControl4 will also start resizing/growing until it overtakes DockTabControl5 and throws some exceptions.
It also seems that the intended values for DockWidth and DockHeight are pixels, so I don’t know how our old values like 45 or 30 ever worked? The actual width/height values on a 1080p monitor are the values in that first pic I linked.
Again, the objective is to have DockTabControl5 fill all the empty space with thin controls on all sides of it following the layout from that first picture I linked. Nothing ever gets docked to the center DockTabControl5. We always just open tools directly to one of the existing DockTabControls at one of the 4 dock positions around the main center DockTabControl5. We essentially do something like the code below to get the first matching DockTabControl (Top, Bottom, Left, or Right) that doesn’t contain our main content control:
docker.NestedItems.FirstOrDefault(dc => dc.Dock == targetDock && !dc.Items.SourceCollection.OfType<C1DockTabItem>().Any(dti => dti.Content.GetType().TypeEquals(typeof(MainContent)))
Any advice for configuring this DefaultProject.json would be greatly appreciated!


