In my last blog entry I mentioned how I had created a Web control that displays a box with rounded corners, using GDI+ to dynamically create the corner images based on the box's properties (background color, border color/style/width, etc.). I have just published an article on 4Guys about this Web control - Introducing the RoundedCorners Web Control - including the complete source code for the control. There are a couple of minor issues with the control that I hope others will be able to improve upon:
- The design-time experience is suboptimal, as the rounded corner images are not created during design-time. The result is a box sans rounded corners!
- The control currently uses an HTML <table>; it'd be nice to have someone upgrade it to use CSS and have adaptively choose what approach to use based on the visiting browser.
- As Jeffrey Palermo mentioned in the last blog entry's comments, it would be nice to have smoother corners.
As always, I invite you to check out the live demos and share any feedback/suggestions/comments you may have. You can also check out my Code Projects page, which lists the open-source ASP.NET Web controls I've created.