by Amr Elsehemy
3. March 2008 12:28
Few days ago, I blogged about how to enable auto formats in the design time smart tag by overriding simple property, this post will describe how to enable design time template editing in a similar simple way.
More...
by Amr Elsehemy
25. February 2008 14:58
Back to design time support, but this time with ASP.NET server controls, most complex & simple controls built in the .NET framework are associated with an Auto Format.. link in the smart tag as the one shown in the figure, I showed in a previous post how to add links and properties to the smart tag of a control.
More...
by Amr Elsehemy
12. February 2008 13:16
This is final part of my series/tutorial on design time support, it was really fun writing it and hearing your comments and suggestions, I really learnt alot and hope you too had some experience in writing design time support for the custom controls.
In this part, I will show you how to debug the design time code we are writing (works with vs 2005 and 2008).
More...
by Amr Elsehemy
8. February 2008 09:19
The default PropetryWindow in the visual studio shows 2 Tabs one for properties and another for events. If one day you thought that you have set of members might be Properties that you need to put them in an extra property tab then in this post you will learn how to put extra tabs.
When this can be useful?
After the ajax era has arrived and component authors started to build some ajax controls we usually see Properties named " ClientXXX " where xxx is the event name and these properties just appear in the properties tab while it would be more appropriate to show them in an extra tab say a Client side events. More...
by Amr Elsehemy
4. February 2008 12:56
Another new feature added in the Design Time Environment in visual studio 2005 and 2008 for windows forms and windows user controls designers is the Snaplines.
What is a snapline?
A snapline is a dynamically generated UI layout guide line. Snaplines are generated during control move operations in the designer. The location of other controls on the design surface provide the lines.
All controls by default inherit the default the Snaplines which appear while moving that interact with Tops, Lefts, Bottoms and Rights of other controls, with the form border, spacings from other controls and some other. One remarkable snapline is the one that appears while moving a Label control beside TextBox controls the purple snapline that aligns the text position instead of the control position. More...
by Amr Elsehemy
1. February 2008 23:15
One more advantage you get from building a custom designer for your custom controls is that you can add smart tag panel to add important most used properties and methods.
What is a Smart Tag?
SmartTag is one of the new enhancement of VisualStudio 2005 design time and VS 2008 as well. Smart tags are menu-like user interface (UI) elements that supply commonly used design-time options. Most of the standard components and controls provided with the .NET Framework contain smart tag and designer verb enhancements. More...
by Amr Elsehemy
26. January 2008 08:49
This post is simple and neat, the goal now is to add some designer verbs, so lets get straight.
What is a Designer Verb?
A designer can use the DesignerVerb class to add menu commands to the shortcut menu for the component it provides designer support for in design mode. Designer verbs associate a menu item with an event handler. Designer verbs are provided to the design-time environment by the Verbs property of the IDesigner interface. More...
by Amr Elsehemy
25. January 2008 07:36
As I mentioned in introducing the Designer post that one of the designer powers is filtering the control members, filtering here means removing or adding members (Properties, Events or Attributes) to the DesignTime Environment in the PropertyWindow.
The IDesignerFilter interface has the methods that enable filtering the members that appear in the Design time PropertyWindow.
The IDesignerFilter interface has 6 methods for filtering.
Why for each Properties , Events and Attributes there is a Pre and Post Filter method?
More...
by Amr Elsehemy
20. January 2008 00:55
What is a Designer?
Designers are objects that have the ability to modify a component’s design time behavior on a
design surface. A designer can display a component’s user interface as well as allow property
changes to the component. It can also provide other services and perform additional processing
specific to the component it is associated with. More...
by Amr Elsehemy
18. January 2008 11:15
In the previous post I gave a brief introduction on what is a UITypeEditor and what you can get from using it, this part I will show you how to implement one.
So here are the steps:
- Define a class that derives from System.Drawing.Design.UITypeEditor.
- Override GetEditStyle to return a supported UITypeEditorEditStyle.
- Override EditValue and pass any controls necessary to the IWindowsFormsEditorService.
- Override GetPaintValueSupported.
- Override PaintValue if the editor supports painting.
- Override IsDropDownResizable if the editor is resiazble.

Now we will go through the steps one by one, the example I will introduce here will be another ColorEditor, I will use the ColorWheel introduced and explained in this MSDN magazine article.
The final editor that we will make will look like this
More...