Random Ramblings About Making Games and Stuff from Cloud

Posts tagged ‘List box’

Things I Learned using Windows Phone 7 devkit

I recently started playing with around with Windows Phone 7 devkit and found it to be surprisingly productive tool set. I managed to develop a simple app within couple of weekends with almost zero previous knowledge on WP7 programming. I learned a couple of things on the way and wanted to tell them to you.

What I did was I started with installing Expression Blend, Visual Studio 2010 and WP7 SDK. I made UI using Blend and did the coding with Visual Studio. Benefits of this were near WYSIWYG experience with WP7 UI and no broken XAML during development.

And now the tips what I learned:

  • Start with the data. Design the data model first because it will help you working with Expression Blend. Make design time data for your blend project and how to trouple shoot it.
  • Trust the Blend. Use it and learn it. I admit that it took good amount of time to find how to make all of the stuff. Some weirdness that I found hard to locate:
    • Databinding to UI items
    • Table you need to add row and column definitions (found under layout)
    • To add more complex list box items than just plain text you need to edit List box item template. Found under list box right mouse click, edit generated Items, edit current.
    • This is how to create menu context items.
    • This is how to create application bar.
    • Use system styles in text boxes PhoneForeground etc. So if user changes the phone theme your app will do the same.
    • DO NOT apply system styles to list boxes! It will break selected styles. Adjust the font size and font or make you own styles that only change font and font size. Otherwise you will spend time on implementing list box selected item visualization.
  • BIND UI to data. Seriously this will help a lot. You should not assign data to UI components. All my weird UI bugs where data is not updating where result of not doing the BIND correctly.
  • Test BIND working on your data periodically. This is because you want BINDING to work.
  • Make your data implement data as INotifyPropertyChanged change so that when data changes it automatically changes on UI.
  • Define data as serialisable.
  • Icons where to find default icons: “C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Icons”
  • How to make clear enough icons. You can also use Inkscape with 1028×1028 canvas and convert image to png.

Well that’s for now. I will make follow up posts on things I learn during my ventures on WP7 world.

ps. Here are some screenshots on the app I am working on. Its called “Stuff I Like” and its a simple tool for keeping track on stuff I hear about and might like.

%d bloggers like this: