Freigeben über


Merge Updates (Compact 2013)

3/26/2014

When a designer makes changes to the source Expression Blend project, you use the Windows Embedded XAML Tools update tool to identify and merge those changes into your Platform Builder subproject. If the designer adds new UI functionality, new code stubs should appear in your subproject when the update process completes.

This topic continues with the MyClock example to show you how to merge XAML for Windows Embedded Clock UI changes into your MyClock application. After completing the update process, you should see an improved clock face that uses the application functionality you added in the previous sections.

Prerequisites

Add Event Handlers

Modify XAML for Windows Embedded Project Files

To simulate the changes that a designer would make to your source Expression Blend project, you will overwrite several files in your Expression Blend project with newer files from the WindowsEmbeddedXAMLClockUpdate folder.

To modify your XAML for Windows Embedded Clock sample project

  1. Browse to the WindowsEmbeddedXAMLClockUpdate folder at %ProgramFiles%\Windows Embedded XAML Tools\WindowsEmbeddedXAMLClockUpdate.

  2. Select and copy all of the files in this folder to your source Expression Blend project, located at C:\ExpressionBlend\WindowsEmbeddedXAMLClock, overwriting MainPage.xaml, Readme.txt, and WindowsEmbeddedXAMLClock.csproj.

This designer modification adds a new resource image (Windows.png), and adds new elements to MainPage.xaml for an improved clock face.

Update Your Subproject

To update your subproject, you select the subproject to receive the updates and start the Windows Embedded XAML Tools update tool. The Windows Embedded XAML Tools update tool automatically updates your source files to reflect changes made to the source Expression Blend project. Although Windows Embedded XAML Tools may add new code stubs to your source files, it will never delete or remove your code during update. Follow these steps to update your MyClock project.

To update the MyClock project

  1. Open your OS design project in Platform Builder.

  2. In the MyClock subproject, open the MainPage.xaml file.

    Visual Studio may display a dialog box with the message "This file has been modified outside of the source editor. Do you want to reload it?" If so, click Yes to All.

  3. On the Tools menu item, click **Windows Embedded XAML Tools **, and then click Update XAML for Windows Embedded Subproject.

  4. Wait for the Update Windows Embedded XAML Tools Project progress window to show that the update has completed.

  5. On the File menu, click Save All.

  6. Verify that the "Summary Report" displays the message No Errors Reported, which indicates that the update completed successfully.

If the update does not succeed, see Troubleshoot the Clock Application.

Run the Updated Application

After you complete the updates to MyClock, build and run MyClock.exe again. You should see a different clock face, as shown in the following figure.

Updated Clock Face

Updated Clock Face

The hands continue to move and keep time as before, and you do not need to make any code changes to accommodate the UI updates. When you click the clock’s bezel, the MainPage::ChangeBezel event handler runs and increases the thickness of the border of the new clock face, just as it did with the previous version of the clock face.

After Mouse Click Event

After Mouse Click Event

Although the designer made fundamental changes to the UI design of the XAML for Windows Embedded Clock, your application code continues to drive the clock without your having to make any code changes for the redesigned UI.

See Also

Tasks

Troubleshoot the Clock Application

Concepts

Getting Started with XAML for Windows Embedded