Main Site Documentation

Snippet - Glide Buttons and Gadgeteer Demo


#1

[title]Glide Buttons and Gadgeteer Demo[/title]
http://code.tinyclr.com/project/411/glide-buttons-and-gadgeteer-demo/
[line]
This demo project shows how to use the Glide graphical library with a Gadgeteer project. The project displays three buttons on the T35 display module using the Glide library, with each button turning on the Red, Green, or Blue component of the Multicolor LED module, depending on which button is tapped.

The project demonstrates the following:

  • storing Glide XML as a string resource
  • Inititalizing Glide Touch functionality
  • loading a Glide window from a string resource
  • obtaining a reference to a Glide button and assigning an event handler for its TapEvent
  • handling events from a Glide button and changing the properties of a Multicolor LED module

Source code for program.cs is shown below, and the full demo project, including the resource file containing the Glide XML, is attached.