Available via the Microsoft Expression Gallery

Feb 4, 2010 12:58 GMT  ·  By

Microsoft’s latest iteration of the Windows client comes with a sensor and location platform which allows developers to build applications which can have functionality tailored to the environment of the end user. Windows 7 can grab input from various sensors, and applications built on top of the operating system can leverage the added information in order to adapt to a specific location or to exterior stimuli, such as brightness, the position of the device, etc. Michael S. Scherotter, media experience evangelist Communications Sector of the Americas Microsoft, has worked to make it easier for devs leveraging Expression Blend to build Windows Presentation Foundation apps that take advantage of sensor input.

“I wanted to try out creating an easy way for Expression Blend users to design applications that use sensors, so I created a Sensor Trigger that has a custom editor. The custom editor shows the available sensors, the status of each sensor as well as the when sensor data is reported,” Scherotter stated. “I uploaded the source code and a demo project to the Expression Gallery for developers and designer to try out. I’d love any feedback on this - make sure you rate the behavior in the gallery.”

Devs must understand that the Windows 7 Sensor Trigger for WPF Applications is not built by Microsoft, but a project put together by Scherotter instead. This does not mean that Expression Blend customers cannot take advantage of the resources offered via the Microsoft Expression Gallery free of charge under a Creative Commons license.

“Windows 7 WPF Sensor Triggers with custom editors for Expression Blend. SensorTrigger: A Trigger that can be configured to respond to specific sensors or sensor types. ReportLocationAction: An Action for TextBlocks that reports location for a SensorTrigger. The Editor shows the available sensors, each showing its collection status (whether it's active or inactive) and when data is reported to a sensor,” reads the description of Windows 7 Sensor Triggers.

Of course, developers using the .NET Framework for their applications can turn to a source code library provided by the company to access Windows 7 sensor platform APIs, but not only, via managed code. All they have to do is use the Windows API Code Pack for Microsoft .NET Framework. “Sensor Platform supports biometric, electrical, environmental, light, location, mechanical, motion, orientation, and scanner sensors,” Scherotter said.