StrataFrame Forum

Extending Smart Tags with Designer Actions in SF classes

http://forum.strataframe.net/Topic15527.aspx

By Charles R Hankey - 4/11/2008

I am a VS/SF/.NET newbie and come from a VFP/VFE world of RAD builders and wizards.  I am in awe of the potential for this kind of stuff in Visual Studio. 

It would seem natural to have the SF base controls - textbox etc - have smart tags that immediately show the properties that will almost certainly have to be set every time they are dropped on a form - name, binding field, text etc.

I am delving into designer actions and how to implement them, but I thought it would be worth asking if anyone could be kind enough to walk me through this in a Strataframe context - how would I add binding field to the smart tag for all Strataframe textboxes ( and how will I do this in a way that future updates won't blow away my changes)

Seems like everyone working with SF a lot must have already thought of this.  Would suggest it as a framework enhancement.

TIA

Charles

By Trent L. Taylor - 4/11/2008

Creating designers within the DTE is not quick answer.  It is actually a very length and involved process to explain.  In theory it is simple, but there are a lot of elements to work through.  You are most likely referring to a Designer.  You first create a designer class by inheriting the ControlDesigner (or another designer type):

Public Class MyDesigner
    Inherits System.Windows.Forms.Design.ControlDesigner
End Class

Once this is done, you then create your verbs or actions that will be available on this designer.  We do this for localization controls such as a label and then have more complex designers on elements such as the wizard and panel manager.

What you are asking for is actually not a new request in regards to being able to drag on a binding field and it chooses the appropriate control and throws on a label, etc.  If you look through the requests you can see that there has been plenty of discussion on this topic.  We intend to add a bit of this functionality in future releases, which has also been discussed on some of those threads.  Implementing this in .NET with full support for all control types isn't a weekend project.  When we add something like this to the framework it has to work across any control type and collection (i.e. people that use DevExpress, Infragistics, etc.)  so that complicates things a little and is why we haven't just slapped a tool out here.  At any rate, we do plan to have this functionality in the future.

By Charles R Hankey - 4/11/2008

I think I may have made what I'm looking to do sound more complicated than perhaps it is.  I just meant how would you add properties to the smart tag pane of a textbox control, for example, so that the most commonly used ones would be easily accessible.  I guess the MSDN made it look easy in that a subclass of the base textbox (i.e. SF textbox ) would be modified once at the framework level. no?

Of course, I also understand my ignorance of the underpinning of .net is deep enough that I should probably figure that if it were as easy to implement as I thought it would already be there Smile

By Trent L. Taylor - 4/11/2008

Are you talking about in code or in the designer?
By Edhy Rijo - 4/11/2008

I believe Charles is talking about the SF Smart Tags in the Designer.

So he would like to see the most common used properties like BindingField, BindingFormat, etc. in the Smart Tag in order to speed up the process of setting the objects.

If this task is easier than what will come in future versions, then I will also welcome this enhancement BigGrin

By Trent L. Taylor - 4/11/2008

Yeah, that's what I thought that he was talking about...this is called a designer whereas a smart-tag is actually something different that you see within the code editor.
By Trent L. Taylor - 4/11/2008

BTW, Charles, I agree that this is a good idea.  It is something that we should probably do in the near term for the SF controls.
By Charles R Hankey - 4/11/2008

Edhy and Trent -

Thanks, that's exactly what I mean ( didn't know the .net for "builder")  Smile