O'Reilly logo

Professional Windows® Embedded Compact 7 by Thierry Joubert, David Jones, Samuel Phung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

UPDATE THE SWE APPLICATION SUBPROJECT TO INCLUDE ANIMATION

In the previous section, Storyboard1 is added to the XAML_Hello XAML code UI project to animate the Button control. The exercise in this section updates the SWE_Hello Compact 7 subproject to include the animation function and add codes to trigger the animation.

Work through the following steps to update the SWE_Hello project:

1. Launch the MySWE OS design from the VS2008 IDE.

2. From the Solution Explorer tab, expand the SWE_Hello subproject under the \Subprojects folder.

3. Expand the \Resources files folder, and double-click the MainPage.xaml file.

4. From the VS2008 Tools menu, select Windows Embedded Silverlight Tools, and click Update Silverlight for Windows Embedded Project to launch this wizard and update the SWE_Hello subproject to reflect the change made to the XAML_Hello Expression Blend 3 project.

5. From the VS2008 Solution Explorer tab, expand the SWE_Hello subproject’s \Source files folder, and double-click the MainPage.cpp file to open this file in the code editor window.

6. Search for the button_Click event handler and replace the codes in the event handler with the following code to trigger the storyboard to animate the Button control.

image
HRESULT MainPage::button_Click (IXRDependencyObject* pSender, XRMouseButtonEventArgs* pArgs) { HRESULT hr = E_NOTIMPL; if ((NULL == pSender) || (NULL == pArgs)) { hr = E_INVALIDARG; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required