ASP.NET Custom Server Controls: Dynamically Expandable Round Cornered Button - Exposing properties for every side (including corners) of button
(Page 2 of 7 )
As you know, every side of the box needs to be provided with some image (even the corners). The following are the properties which handle all of those images (paths of those images).
Property ImageTopLeftURL() As String
Property ImageTopMiddleURL() As String
Property ImageTopRightURL() As String
Property ImageMiddleLeftURL() As String
Property ImageMiddleMiddleURL() As String
Property ImageMiddleRightURL() As String
Property ImageBottomLeftURL() As String
Property ImageBottomMiddleURL() As String
Property ImageBottomRightURL() As String
I hope all of the above are simple to read and understand. I declared each of those properties with an attribute at the top as follows:
<EditorAttribute(GetType(System.Web.UI.Design.UrlEditor), GetType
(System.Drawing.Design.UITypeEditor))>
The above is the most exciting statement used with all the previous properties. The “EditorAttribute” is mainly helpful for the Visual Studio.NET designer to facilitate an editor for the value being provided to that property (similar to the “Font” property).
In this case, we attach a dialog box (Visual Studio.NET supported open dialog) for the property, to facilitate the developer in selecting a respective image from folders within the web application hierarchy. If we don’t specify the above attribute, the developer needs to remember and type the entire path of the image within the property window of Visual Studio.NET designer, as opposed to simply selecting the image file.
Next: Starting with Table >>
More ASP.NET Articles
More By Jagadish Chaterjee