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.
HRESULT MainPage::button_Click (IXRDependencyObject* pSender, XRMouseButtonEventArgs* pArgs) { HRESULT hr = E_NOTIMPL; if ((NULL == pSender) || (NULL == pArgs)) { hr = E_INVALIDARG; ...Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access