Archive for May, 2006

Our second mode is called Group and provides the look and feel of the KryptonGroup control.

NavigatorMode = Group

This mode is barely more interesting than the first one. Here you can see the navigator without any pages added showing the group mode.

Once you add a KryptonPage it places the page inside the group as you would expect. Here is a page added with the default Office 2003 palette selected.

The navigator does honor the palette settings as for any other krypton control and so here is the appearance when using the two customer palettes called Blogger and LightWeight.

I absolutely promise that the next mode will have some user interface that allows the selection of different pages.

The KryptonNavigator now has a property called NavigatorMode that determines the visual mode of operation. Our first mode implemented is called Panel.

NavigatorMode = Panel

As this is the first mode added it is the simplist possible mode I could create. You can probably guess from the name that it gives the visual appearance of a standard KryptonPanel. Here is a picture of the navigator without any KryptonPage instances.

Exciting eh!

In this mode the entire client area is filled with the selected page. So as soon as you add the first KryptonPage into the Pages collection you get the following.

In this mode you there is no visual interface for changing the selected page, you can only achieve that by using code to alter the SelectedPage or SelectedIndex properties.

But it might still be useful in some scenarios where you want to easily control the displayed page from code. At least you know that any new modes I add have to be more interesting than this!

Version 1.1 of the Krypton Toolkit is now available for download.

If you are on the download notification list then you will already have received an email with a download link and a list of improvements for this revision. Of course, if you are following this blog then you will already know about the list of improvements but if just joining then here is the summary.

Improvements
Better text rendering
Better performance
Add buttons to KryptonHeader controls
Add buttons to KryptonHeaderGroup control
Three new application examples
New tutorials

Download link
Download Toolkit 1.1

Enjoy!

A new demo called Expanding HeaderGroups has been added to the toolkit in order to show just one of the many possible ways to utilise buttons on headers.

You can see below how two KryptonSplitContainers have been used to split up the client area into three distinct areas. Each area has a KryptonHeaderGroup filling the area.

When you press the button on the left hand area it shrinks down the size of the area to be just enough to show just the header. It also changes the orientation to be vertical in order to conserve as much space as possible.

Likewise the bottom right area has a button that when pressed shrinks down to occupy a minimal area.

This is achieved with only a few lines of code executed whenever the relevant buttons are pressed. The source code for the sample will be included in the next release along with a tutorial describing the technique used to achieve the effect.

Being able to provide just a single image for a KryptonButton is a little restrictive. Now you can provide per-state images to have a truly styled button appearance.

Office2003

When using the default Office2003 palette you only need to provide a single image for a KryptonButton control. This is because the image itself does not change during hot-tracking or when the button is being pressed. Instead the background colors change to indicate the state.

Custom Palettes

But if you are creating a custom palette then maybe you want to have your button displayed purely as a set of images. By providing a different image per-state you can achieve any look and feel you want. These images are not restricted to rectangle shapes either because you can provide a PNG that contains transparent areas.

You can see below the new properties added for specifying per-state images.

Note that if a per-state image is not provided then it will use the standard Image value instead. So you only need to actually specify the images that differ from Image.