Suggestion - CslaActionExtender with toolbar support

Suggestion - CslaActionExtender with toolbar support

Old forum URL: forums.lhotka.net/forums/t/7139.aspx


Vinodonly posted on Sunday, June 21, 2009

Is there a possiblity of adding CslaActionExtender with toolbar support also..

Although the C# 2008 book gives example of using it with toolbar but if this control can directly support toolbar then it will be very helpful..

RockfordLhotka replied on Monday, June 22, 2009

I'll add this to the wish list and see if Miguel is interested in the idea.

RockfordLhotka replied on Monday, June 22, 2009

Miguel is fast - here's his response:

There's a reason I didn't do that to begin with, and it goes with the reason why I broke out the extender itself from the binding components that drive it.  Microsoft provided an interface, IButtonControl, for all to obey when writing custom buttons and links.  So far, I've encountered that all the major component vendors use this for their buttons and links.  This is the reason the extender works great with third-party controls.  Microsoft provided no such interface for the creation of toolbar items.  Everyone's toolbar is completely different and has no point of commonality or abstraction.  So I provided the BindingHelper component so that you can have the same functionality that the extender provides for you regarding binding, unbinding, undoing, etc.  It takes code, but not nearly as much as doing it all manually.  I have a sample project which I forwarded you, but am attaching here, that demonstrates both cases with two identical forms.  One form uses buttons, the other uses a toolbar.

RockfordLhotka replied on Monday, June 22, 2009

Oh, the ActionExtenderSample he mentions in that reply is in the Samples download for CSLA .NET.

Copyright (c) Marimer LLC