by Jeff Handley via Jeff Handley on 12/12/2008 5:44:32 AM
Earlier this year, I talked about how I hadn’t yet seen the need for using the Custom Controls Everywhere approach in XAML. I said, “Just use the controls you have, apply styles, and attach properties and behaviors. And if you find a case where this falls short, let me know!”
Well, today, Rick Strahl had a tweet:
What's the best way to provide cell padding in the Silverlight grid control? Apply margins to all cell child controls?
To which I replied:
Yeah, unfortunately, margins on all child controls. Or, create a custom Grid control that derives from Grid, and add padding.
There ya have it: evidence that a custom Grid control would have been handy. I’ve actually seen some other hints at the Custom Controls Everywhere need in XAML over the last few months, and I’ve heard of people creating custom controls in Silverlight pretty often.
So I think I need to resume preaching Custom Controls Everywhere, regardless of the UI platform. I should have listened to my gut more than my head on this one. Custom Controls Everywhere will never hurt you, it can only help you. I implore you to start wrapping the stock controls with your own. You will thank me for it eventually, I promise you. :-)
If you aren’t familiar with my Custom Controls Everywhere concept, here are some of my posts on the subject:
Original Post: Custom Controls Everywhere – In XAML
The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.