Thursday 8 October 2009

Windows Embedded CE 6.0 R3: Silverlight for Windows Embedded sample Application

Hi folks,

In this post, I am going to talk about the new Silverlight for Windows Embedded sample application called XamlPerf. In addition of being a sample UI, it also displays some performance information on your screen as well as in the debug output window. The UI, however is not functional, yet. That task is up to us – currently if you click anywhere, XamlPerf will exit. The sample UI comes with different animations which are defined in different XAML files. These animations are Bounce, Bubbles, and Carousel:




Bubbles and Carousel both load with a default screen resolution of 800x480.

In order to include XamlPerf to your OSDesign you need to add the SYSGEN_SAMPLEXAMLPERF sysgen variable. You will find that this sysgen variable is NOT part of your catalog; but that you have to set is manually. To do so, simply add it as an environment variable from the Project->Properties dialog from within the PlatformBuilder UI. Upon rebuilding your system you will get shortcuts for the Bounce, Bubble, and Carousel XamlPerf on your devices desktop.

You can now either start XamlPerf by:
  • Double clicking on one of the shortcuts or

  • Via the command line with the following command: XamlPerf \windows\xamlperf\[XAMLFile].xaml where XALMFile is Bounce.xaml, Bubbles.xaml or Carousel.xaml


The source code for the XamlPerf sample application is available under _PUBLICROOT\Common\Oak\Demos\XamlPerf whereas the XAML files can be found under: _PUBLICROOT\Common\Oak\Files\XamlPerf. On your device the XAML files reside under \WINDOWS\XamlPerf\.

Have fun!

5 comments:

Norman said...

Hi there, could you tell me how to get hold of the sample code for this article.

Regards
Norman

Jochen Dieckfoß [MVP] said...

Hi Norman,

thanks so much for your comment.

As mentioned in the article, the sample code is part of Windows Embedded CE 6.0 R3 installation and can be found under _PUBLICROOT\Common\Oak\Demos\XamlPerf (Silverlight for Windows Embedded application) and _PUBLICROOT\Common\Oak\Files\XamlPerf (XAML files). If you don’t have Windows Embedded CE 6.0 R3 installed, you can find an evaluation version on the Microsoft website (http://www.microsoft.com/windowsembedded/en-us/downloads/download-windows-embedded-ce6.aspx scroll down until you find the “Additional Downloads You Need to Get Started” box)

Have fun
-Jochen

Anonymous said...

Hi,
Is the performance measurement functional for this application. I am always getting fps printed as 0.
Regards

Jochen said...
This comment has been removed by the author.
Jochen Dieckfoß [MVP] said...

Hi,

thanks for your question. Have you used XamlPerf in debug or release? Have you used a real target or the emulator?

The debug version prints the frame rate along with some other performance information, such as CPU usage, not only in a corner on the screen but also in the PlatformBuilder debug output window.

As you can see in the first screenshot (Bounce.xaml), a frame rate of 5 fps was recorded on my target. So it worked for me. I have not tried running XamlPerf on the emulator.

I hope this helps.

Have fun!
-Jochen