You see them more and more, on phones, computers, MP4 players, etc. Widgets. And I think its logical becouse the user can now choose what he or she has on her display. I tought it would be usefull to have some sort of Widget system on .NET Micro Framework. An example: a termostat has multiple sensors for humidity, min/max/current temperature, etc. Some users find the humidity very important but others are more interested in the minimum temperature. With Widgets they can choose what to see directly.
Ive build a basis for a Widget system in a demo application. It consists of three main base UIElements:
Based on the normal Canvas it provides absolute positioning of child elements. It has a DispatcherTimer that helps the Widgets start and stop moving.
This element provides the icons on the left part of the screen. It automaticly loads the Widget Icon from the Widget Type and creates a new Widgets instance on StylusDown.
Base class for Widgets that can be used to build Widgets. Provides methods for moving Widget, Icon used for WidgetIcon.