Enabling Design Time Template Editing

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.

Template Editing 

More...

Tags: , ,

Design Time Support

Adding Auto Format for ASP.NET Custom Controls Design Time

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.

autoLink  More...

Tags: , , ,

Design Time Support

Custom Controls Design Time Support Part 14: Extra Property Tab

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...

Tags: , ,

Design Time Support

Custom Controls Design Time Support Part 13: Adding Snaplines

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...

Tags: , , ,

Design Time Support

Custom Controls Design Time Support Part 12: Adding SmartTag

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?

aa

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...

Tags: , , ,

Design Time Support

Custom Controls Design Time Support Part 11: Designer Verbs

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...

Tags: , , ,

Design Time Support

Custom Controls Design Time Support Part 10: Filtering Control Members

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...

Tags: , , ,

Design Time Support

Custom Controls Design Time Support Part 9: Introducing the Designer

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...

Tags: , , ,

Design Time Support

Custom Controls Design Time Support Part 8: Implementing UITypeEditor

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:

  1. Define a class that derives from System.Drawing.Design.UITypeEditor.
  2. Override GetEditStyle to return a supported UITypeEditorEditStyle.
  3. Override EditValue and pass any controls necessary to the IWindowsFormsEditorService.
  4. Override GetPaintValueSupported.
  5. Override PaintValue if the editor supports painting.
  6. Override IsDropDownResizable if the editor is resiazble.a


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...

Tags: , , ,

Design Time Support

Custom Controls Design Time Support Part 7: UITypeEditor Introduction

by Amr Elsehemy 17. January 2008 05:52

In the previous posts in this series I introduced how to use some basic and advanced Attributes and how to add an image for your control to appear in the toolbox and then I gave an introduction on TypeConverters and examples here and here on how to use the TypeConverters. Now I will give an introduction on how UITypeEditors used in design time.

First, what is a UITypeEditor anyway from MSDN :

The UITypeEditor class provides a base class that you can derive from and extend to implement a custom type editor for the design-time environment. Typically, your custom type editor interacts with the PropertyGrid control.

More...

Tags: , ,

Design Time Support

About the author

Amr Elsehemy
MCSD C#.Net,
MCTS Sql 2005,
MCPD Enterprise
avatar
E-mail me Send mail

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar