As pointed out by a commenter on the previous blog entry, the KryptonCommand would be more useful if it also worked against the KryptonContextMenu. So that is exactly what I have now added. Here you see a KryptonDropButton that shows a simple context menu when pressed…
![]()

Once I assign a KryptonCommand instance to each of the compatible menu items we get the following display instead…
![]()

As you can see, the menu item, menu check box, menu check button and menu link label all update to account for the settings inside the attached command. Once I press the check button to toggle the checked state it automatically updates all the appropriate menu items…
![]()

This brings me to another change I made. Until now the only change to a menu item that would be reflected in an already displaying context menu was CheckState. I have now expanded on this so that Text, ExtraText, Image and Enabled properties also immediately updated in a showing context menu.
There is one caveat though. Although the image and text will be updated the size of the item will not change. So if you assign a larger text string than before the context menu will not auto expand so it can be all be shown. It just uses the existing sizing. Not perfect but certainly an improvement on the previous functionality.
February 1st, 2008 at 7:54 pm
This is it!
Great!
February 1st, 2008 at 9:10 pm
Shameless!
http://channel9.msdn.com/ShowPost.aspx?PostID=378834#378834
February 1st, 2008 at 11:16 pm
Thanks for the plug. Always nice to be mentioned next to the big boys!
March 15th, 2008 at 11:32 pm
Nice, I’d like to download KryptonCommand dll, would you post a link to this library?
March 16th, 2008 at 10:50 am
This new component will be in the next full release in a month or so.