Browse by Tags

Handling designtime resize for controls
Published 03-17-2006 7:08 PM | jokiz
How to do this? You don’t have to override OnResize and do those checks (DesignMode, IsHandleCreated, etc.). I’ve been here and I’ve encountered a number of problems. A better way is to create a designer class, attach a handler on the Resize event of...
Filed under: , ,
Strongly-typed Collection’s Add and AddRange methods
Published 04-14-2005 3:41 PM | jokiz
The CollectionCodeDomSerializer uses reflection to serialize a serializeable collection properties to locate methodinfo with “Add” and “AddRange” as names. We have a coding convention here to use prefix to clearly distinguish methods from properties,...
Overriding ControlDesigner.SelectionRules
Published 04-11-2005 7:23 PM | jokiz
The virtual readonly SelectionRules property of the ControlDesigner class is necessary if you want to fiddle with the selection grabs of your control at designtime (if you want to make your control not re-sizable vertically like the Windows Forms TextBox...
MissingMethodException during a form load at designtime
Published 03-17-2005 7:26 PM | jokiz
Some control properties where dropped. Forms still have them in InitializeComponent. Form is loaded at designtime with an attached debugger instance (devenv.exe). CodeDomSerializer class tries to deserialize the said property set. A MissingMethodException...
Design-able Abstract Base Forms in Whidbey
Published 02-24-2005 6:18 PM | jokiz
I have blogged about the Windows Forms designer behavior with abstract base forms here . Brian Pepin has an update on how Whidbey can support design-able abstract classes through the new TypeDescriptionProvider class. He also points out an important example...
Undo feature bug of VS2003
Published 02-03-2005 9:11 AM | jokiz
Create a form with anchored controls. (Not just the default Top | Left) Resize the form Hit Undo (Ctrl-Z), voila! The Undo feature at design time is handled by the Windows Forms Designer and the said functionality is one of the complex implementations...
InitializeComponent, Abstract Base Forms and Visual Studio Design Behavior
Published 01-20-2005 10:59 AM | jokiz
It is interesting to know how the Designers works in Visual Studio when one is designing a component, control or form (controls and forms by the way are special kind of components with visual representation at the document surface). Knowing such kind...
DesignerHost and Designer Services reference retrieval
Published 01-18-2005 12:20 AM | jokiz
There are a number of sample codes for designer classes of custom controls. Some are storing internal references to the services (IComponentChangeService, ISelectionChangeService, etc.) and the designerhost, some are getting them when needed. The second...
Filed under: , ,