To begin with, let me state that my starting goal was to simply learn how to develop software for the new Zune HD. I am a Windows desktop and web developer and have developed for the iPhone, so thought the transition to the Zune HD should have been pretty easy, and I was right! Microsoft uses C# for development on the Zune HD. You must have Vistual C# Studio 2008 Express Edition (or another version of 2008) along with the Microsoft XNA Game Studio 3.1 and the Microsoft XNA Game Studio Zune Extensions. Once completed, I was ready to create my first Zune HD application!
Again, my main goal was to simply LEARN how to write applications for the Zune HD. Because of the touch screen on the Zune HD, I immediatley wanted to create applications that utelized this technology. Now, in developing applications for Windows for the Web using Visual Studio, there is a design mode that allows you to visually place controls onto a form or page. Not so with Zune HD development.
I was given a simple Game class with very little code. Hmmm, where to start. After a quick Bing search, I found the XNA Creators Club website. This website seemed to be geared toward using the Game Studio for PC and Xbox360 development, but within the forums, there is useful information regarding Zune HD development.
My first application was going to be a simple stopwatch. I figured a Label control would display the time, and a Button or two for the operation of the stopwatch.......
Ok, let's see here, where is the Label control.... and the Button.......
Well, they don't exist! Looks like I will need to create them myself!
And so is born..... Zune Forms!!!
Zune Forms
After a week of development, I have a fairly stable set of controls to use for my Zune HD applications. My plan is to release the source code to allow for further growth of this project.
What's in it?
As of now, Zune Forms contains the following controls:
Form - This inherits the Game class and provides the basic function of housing controls and caring for them.
Control - This class is the base control class that most other controls will inherit from.
TextBox - Exactly what you think it is. A textbox is displayed and when clicked, a custom keyboard displays allowing for user input.
Label - Displays text in single or multiline mode.
ListBox - Displays a list of items. The list is scrollable using touch.
TabControl - Displays a list of tab pages. Within each tab page can be any number of controls. Tab pages can be scrolled in three ways: 1) By clicking the arrow buttons presented, buy touching the current tab page title and waiting for the Context Menu to display and then selecting another page, or be scrolling left to right/right to left.
Keyboard - For some reason, Microsoft does not expose the keyboard that is on the Zune HD, so I created one. Has two modes, letters and then, pretty much all other characters.
Clipboard - A simple implemtation of a clipboard to allow for copy/paste operations.
Context Menu - When touching a control and holding down for a moment, a context menu can be set to appear with menu items.
Button - A default button is provided, however custom images can be set to the button for the initial and pressed states.
Checkbox - A simple checkbox with two states: checked and unchecked.
This is a current list, but not the complete list. I have plans to add features to these controls and add new controls, such as a progress bar and data grid.
In my next post, I will go into more details on how the code is arranged and why!