Archive for November, 2007

The last TODO item for the KryptonRibbon application menu is now completed. Showing the first level sub menus as a fixed size equal to the recent documents area…

Now I need to update all the samples and documentation to reflect the new ribbon features in the upcoming release.

One of the most useful innovations with the Ribbon app menu is positioning the recent documents list separately to the main menu items. It makes it must easier to find that document you were editing yesterday. You can now specify a collection of recent document entries for the KryptonRibbon by using the new RibbonAppButton -> AppButtonRecentDocs property…

Note that if you leave the list empty it does not show the recent documents column, so if this feature is not relevant to your application you can avoid having it displayed by just leaving that collection empty. You can also alter the Recent Documents title that appears at the top of the column. This allows you to repurpose the column, for example you could change the text to Recent Users and then provide a list of recent usernames for selection.

Also notice the provision of buttons at the bottom of the app menu. These are just ButtonSpec definitions specified using the new RibbonAppButton -> AppButtonSpecs property.

In case you missed it I will point out that the bottom half of the app button is now draw as part of the app menu so that it appears to be underneath the app button.

But there is still one last feature to implement. When you select a context menu that has a sub menu you currently get the following display…

This is incorrect as the sub menu should be forced to the same size and position as the recent documents column. You might not have noticed this when using the Office 2007 applications, give it a go now and notice how all the first level sub menus appear as an area that completely covers the recent documents area.

The most requested feature for the KryptonRibbon is an application menu that mimics Office 2007. The existing use of a standard ContextMenuStrip is functional but inadequate. It just looks wrong. I started work on the Krypton implementation of this feature last week. You can see below what I have implemented so far…

A new property called AppButtonMenuItems allows you to specify the set of items in the menu portion of the window. Anything that can be placed into a KryptonContextMenu can also go here, so you can have headers, separators, menu items and any other types added in the future.

Another new property AppButtonSpecs allows you to specify a set of ButtonSpec definitions. These are displayed on the bottom line of the window and can be seen above as Options and Exit buttons. These allow all the options of Toolkit ButtonSpec definitions, so you can specify an image, text and extra text values.

There are ribbon level events for the Opening, Opened, Closing and Closed actions on the application menu. These operate in the same way as the events on a KryptonContextMenu. They allow you to cancel the showing of the menu and also customize and update item state before the menu is shown.

TODO

1, I need to get the bottom half of the application button drawing in the popup window so it looks as if the window is placed underneath the application button.

2, Allow the definition of a ‘Recently Documents’ list of items. These items would be shown as a vertical list to the right of the menu items and mimic the ‘Recent Documents’ list of Office 2007. This feature would be optional so that applications that do not need this ability can provide no entries and so the list would not be shown.

3, Implement correct keyboard operation. At the moment only the menu items respond to the TAB and navigation keys. I need to get the button specs and the ‘Recent Document’ entries integrated into the keyboard actions.

4, Any other developer requests that seem reasonable!

Krypton 2.6.5 CTP ReleaseNote that this is NOT a full release of the Krypton Toolkit. This is a Community Technology Preview (CTP) and intended for early adopters that want to experiment with the new additions.Please post any bug reports with this CTP to this forum and not the regular Toolkit forum.

New Features
- KryptonComboBox
- KryptonTextBox
- KryptonRichTextBox
- Toolkit controls use KryptonContextMenu
- ButtonSpecs use KryptonContextMenu
- Navigator/Ribbon use KryptonContextMenu
- Ribbon uses KryptonComboBox/Text/RichTextBox

Not yet implemented
- Ribbon Application Menu
- Palette Designer support for KryptonContextMenu
- Design time interface for editing KryptonContextMenu

[Download Link Remove]

The KryptonNavigator now uses the KryptonContextMenu for the menus that it provides. Here you can see the context button showing the Krypton version of the context menu…

I’ve added a new property to the KryptonPage called KryptonContextMenu. Now when you right click the client area of the page it will by default show any defined KryptonContextMenu property. If the property is not defined it will fall back to using the ContextMenuStrip, if set, as it is the existing functionality…

But the biggest change is a new event KryptonNavigator.ShowContextMenu that is fired when you right click a page header. This property allows you to specify a context menu (KryptonContextMenu or ContextMenuStrip) that you would like displayed relevant to the page. You can use this to have a menu with Save, Close, Close All or other page specific commands exposed.