.NET & WinForms for touchscreen applications

Hi All.

I'm just learning WinForms with C# and I am primarily concerned about creating applications to be deployed on a touchscreen. I have a few questions that I hope somone can shed some light on, point me in the right direction for additional information, or offer any suggestions. 

My biggest concern is (semi)transparancy. Ideally I'd like to have semi-transparent controls on top of the main display. Picture a touchscreen friendly "toolbar" that houses buttons on a semi-transparent background to minimize the obstruction of the main display. Playing around I have discovered the Opacity property, but this only will work on a top level form. Now there is no problem in me creating a top level form and sticking buttons on that, however when I set the opacity property, the entire contents of the form becomes transparent, but just the background. (i.e.: a button with an icon "label" will be semi-transparent along with the background). The ideal effect would be an opaque "label" and a semi-transparent background. 

Also, access to the menus are done differently on a touch screen application; typically they are moved to the bottom of the screen so that when accessing them, your hand / arm isn't obstructing the application. Again, I'd like to see this done with semi-transparency too. Picture a larger (touch screen friendly font size) menu bar but sitting on the bottom of the application (where the status bar would be)  but when you expose a menu, the menu drop down (fly-out) would also be transparent. Is this possible  Unfortunately when I tried this on my top level form with a semi-transparent opacity setting, the drop down did not take on the opacity setting and was completely opaque. 

In other GUI toolkits such as Qt, you are able to set the global minimum size that any control can take on, thus effectivly making all of your controls touchscreen friendly with 1 function call. This prevents you from having to create 2 versions of each dialog (one for normal and one for touchscreen mode) . Does WinForms have something similar

Thanks for your time, 
flyte


Answer this question

.NET & WinForms for touchscreen applications

  • Bearcats1375

    Well once the application is in touch screen mode, there would be no reason for any resizing what-so-ever.  It sounds like I will have to manually duplicate each of my dialogs and create touch screen friendly versions. :( 

    What about standard windows dialogs  Will I have to duplicate those as well

    Additionally, I am confused on how I would go about implementing my semi-transparent toolbar concept. The toolbar could have many "pages" housing family of actions. How would I support the tearing-away of each page and let it be floatable  I think I can leverage some of the already written docking architectures (Magic, etc), but is there an easier way

    flyte


  • Skyler

    Any idea on how I can set the minimum size of the controls to be more touch screen friendly  I hope that the only solution isn't to create 2 versions of each dialog - it would be nice if I can simply set a min size on all controls and everything would be the right size (ala Qt)

  • Francisco73

    VG.net is for creating transparent "controls" similar to the ones you describe. You will need some custom graphical components.

    <a href="http://weblogs.asp.net/frank_hileman/archive/2004/05/10/129387.aspx">Transparent Gel Buttons in VG.net</a>

  • fxtrader

    can anyone comment on any one of the aforementioned questions

  • rahil

    For a minimum size to be useful, they have to support some type of resize during, so I think you are talking about some features in whidbey, not the current winforms version. There is no features exactly as you describe -- you would have to create your own sub-classes.
  • .NET & WinForms for touchscreen applications