Saturday, April 22, 2006

"ActionList for .NET 2.0"

The Code Project - The Code Project - ActionList for .NET 2.0

"Introduction

Everyone who has worked with Borland’s Delphi knows how powerful Actions are. Actions are used to link together various UI elements, such as Buttons, MenuItems, ToolbarButtons, making them behave consistently: linked items are Checked/Unchecked/Enabled/Disabled at the same time, they share the same Text and eventually Image property and, of course, execute the same code once clicked.
 
...

Actions can help WindowsForms developer to coordinate the behaviour of various UI elements in a pretty simple and efficient way. I wanted then be linkable to a lot of .NET Framework 2.0 winforms controls (they work with each ButtonBase or ToolStripItem derived control), so the only way to handle this requirement was using reflection. However, the performance drop is compensated using a PropertyInfo caching system, which is able to reuse metadata information for object of the same type.

Crad’s Actions library ships with some purpose-specific actions too: for example, some of them are helpful to handle clipboard-related operations, such as cut, copy or paste, while others provide formatting features when applied to a RichTextBox. According to Borland’s naming, they’re called Standard Actions, and I’m still working on them, so... expect some more for the next releases.

To better understand how easy is implementing complex user interfaces using Actions, you can check out the simple RTF Editor provided as demo application."


Very cool...

I like the idea behind this (I’ve coded in/with Delphi, but it was with 1.0 and so long ago that I don’t remember much, but it still has a special place in my heart...)

Technorati Tags: ,

3 comments:

Anonymous said...

Even more fun with the link ;-)
http://www.codeproject.com/useritems/CradsActions.asp

Greg said...

sigh... stupid fingers...

Thanks... fixed

Anonymous said...

Hi Greg! I'm the author of the article you linked :) Just wanted to say thank you for what you said!
Bye!