.NET Components for Mobility

Peter Foot

Microsoft Device Application Development MVP

Windows Mobile 6.5 Tab Control

If you've seen screenshots or played with the emulators then you'll know that a few (sadly not all) of the controls have been skinned with a new look. Specifically scrollbars and tab controls have a new look and one that can be customised using themes. These are now drawn using bitmaps so a theme can change the look and feel of the tab controls, message boxes and scrollbars beyond just changing the colours. If you run a .NETCF application on WM6.5 you'll find that the Tab Control is painted in the "old" way and does not take on the same appearance. I had a dig around and found that this was due to slightly different window styles applied to the native control. I put some code together to change the styles and lo and behold it worked (some styles can only be set when you create a window and cannot be later modified). The attached file is a source listing in C# which will apply this change to a tab control. Since this workaround is not documented it may break or change the behaviour in future updates so realise that this is provided as-is.

It is a shame that only a handful of controls have been updated, this actually makes some screens look odd because they have a mixture of curvy controls and old fashioned buttons etc - it would have been nicer to see a consistent approach across all the standard controls and ideally one where existing .NETCF code would get the benefit of any improvements without having to hack!

Comments

 

Jinx said:

Hi Peter,

I could not find the attachement?

October 2, 2009 5:16 AM

About PeterFoot

Peter Foot is co-author of the Microsoft Mobile Development Handbook published by Microsoft Press. Peter has been awarded the Microsoft Most Valuable Professional (MVP) accolade since 2003 for his involvement in the Microsoft .NET Compact Framework developer community. Alongside an active presence in several online forums and communities, attendance at developer conferences and involvement in shared-source projects, Peter has also written a number of technical articles and maintains an active technical blog.
Copyright © 2001-2010 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.