Showing posts with label Designer. Show all posts
Showing posts with label Designer. Show all posts
Sunday, August 14, 2005
Cool Designer Trick for Panels
As far as I know, the VS2005 "Designer Tool" cannot be used with the System.Windows.Forms.Panel class. This can be utterly frustrating when doing layout. So, what I do instead is, first, rename my System.Windows.Forms.Panel derived class to extend System.Windows.Forms.Form. Now I can do my layout with the handy visual "Designer Tool" -- e.g. I right click on the source code and select "View Designer." Once I'm done adding widgets/controls and laying them out, I rename the .Form back to .Panel. Tada!
Sunday, June 26, 2005
Property Browser with Custom Controls
One cool feature of VS2005 is the integration of user controls into the Forms Designer. You can even categorize your properties by using browse attributes. By default new properties for a control are filed under "misc" to change this add:
[
CategoryAttribute("Appearance"),
DescriptionAttribute("This is a description of this property")
]
public object MyProperty{
get { ... }
set { ... }
}
For more info on customizing the property browser, go here and search for "Property Browser" within your web browser.
UPDATE (06/26/2005 @ 12:09PM): It appears that the .NET Compact Framework has a relatively restricted ComponentModel space to affect run-time and design-time behaviors. For example, code completion with System.ComponentModel in VS2005 b2 shows only three available methods: (1) DefaultValue (2) DesignerCategory and (3) EditorBrowsable
[
CategoryAttribute("Appearance"),
DescriptionAttribute("This is a description of this property")
]
public object MyProperty{
get { ... }
set { ... }
}
For more info on customizing the property browser, go here and search for "Property Browser" within your web browser.
UPDATE (06/26/2005 @ 12:09PM): It appears that the .NET Compact Framework has a relatively restricted ComponentModel space to affect run-time and design-time behaviors. For example, code completion with System.ComponentModel in VS2005 b2 shows only three available methods: (1) DefaultValue (2) DesignerCategory and (3) EditorBrowsable
Subscribe to:
Posts (Atom)
