Not only am I back from holiday but I there is good news on the broken hand. The cast is off and I’m back into coding mode! Four months is a long time to be away from the coding coal face and I am looking forward to some serious coding sessions with late night deliveries of pepperoni pizza. So what am I going to be working on?

Krypton Workspace

I have just started on a completely new component called Krypton Workspace. If you’ve been following the blog and forums you will know that my intention is to add a docking system to the Krypton suite of components. But in order to add docking windows I need the Workspace component.

This component will be the building block that is used inside the client area of floating windows as well as docked windows at the edge of a Form. Rather than reserve the control for exclusive use inside the docking windows it will also be available as a standalone control. I imagine it will be invaluable as the filler that appears as the main Form content. Think of it as the Visual Studio document editing area but with a little added Kryptonite!

KryptonWorkspaceCell

The KryptonWorkspace has a property called Children that represents the root collection of items for display. Each KryptonWorkspaceCell instance you place inside this will appear as a Navigator instance in the client area of the control. In fact the KryptonWorkspaceCell class is derived from KryptonNavigator. Here you can see the effect of adding three cell instances, one at a time…

 
KryptonWorkspaceSequence

The Children collection is an instance of the KryptonWorkspaceSequence class and allows any number of child elements to be added. By default the sequence direction for layout is horizontal but you can easily switch this to vertical by updating the Orientation property. Unlike Visual Studio you are not restricted to having entries in a single direction. You can place sequence instances inside another sequence. This allows any depth of hierarchy to be created…

The structure used to create this arrangement is very simple…

KryptonWorkspace.Children
...KryptonWorkspaceCell      (1,2)
...KryptonWorkspaceSequence  (Vertical)
......KryptonWorkspaceCell      (T,Y)
......KryptonWorkspaceCell      (Horizontal)
.........KryptonWorkspaceCell      (Q,W)
.........KryptonWorkspaceCell      (E,R)
......KryptonWorkspaceCell      (U, I)

As each individual cell is really just a Navigator, with some extra properties; you can alter each cell with the full flexibility of the Navigator. You could change its mode so it looks like a simple panel or have the full Outlook functionality. 

All of the above examples have used the default sizing which is to give each item an equal amount of the available space. So as you make the window bigger all the cells get bigger as well. My next task is to add more control over the sizing so that you can actually use it in real world scenarios.

6 Responses to “Krypton Workspace”

  1. Dan F Says:

    Dude, welcome back. My brain did a little flip when I saw there was a new Component Factory post. More eye candy :)

    What’d be awesome for the workspace is for the cells to be able to be hidden easily. The sample code in the help file for showing/hiding in a 3 pane app is helpful, but to have it built in would be grouse.

  2. Waescher Says:

    Welcome back, Phil! It was a very hard time to get my morning coffee without any chance to get some news from my favorite blog :)

  3. jkr Says:

    Welcome back!
    I’m really looking forward to see how you implement this Workspace and Docking windows, because unlike other 3rd party components yours is easy to use.

  4. skhan Says:

    I thought this guy went downunder!

  5. Mitch Milam Says:

    Glad to hear the arm’s better and I can’t wait for the next Krypton update.

  6. Jason Says:

    As a big workspace user I’m looking forward to trying it out.
    Keep the good work up.

Leave a Reply