开发者

Windows Mobile Gradient Fill Button - UserControl vs Subclassing Button

I've started looking at Windows Mobile development and I'm struggling to make a pleasing UI using the def开发者_如何学JAVAault controls (they really are ugly). I've looked at a handful of UI 'frameworks' and they are either costly or complex (my needs are simple).

So I've decided to write my own controls. Taking a rounded rectangle gradient filled Button as an example I'd like your thoughts on creating a UserControl vs Subclassing Button.

Good design time support is important to me so I can layout the UI easily. I've played with both alternatives and I've so far failed to get design time painting of the button to work

Thanks

Dave


I personally would subclass the button. If you create a user control you are going to have to expose every proprty on the button you might want to customize.

Take a look at this MSDN article for sub classing a button with a gradient fill http://msdn.microsoft.com/en-us/library/ms229661.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜