Merge Updates (Compact 7)
3/12/2014
When a designer makes changes to the source Expression Blend project, you use the Windows Embedded Silverlight 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 Silverlight 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
Modify Silverlight 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 WindowsEmbeddedSilverlightClockUpdate folder.
To modify your Silverlight for Windows Embedded Clock sample project
Browse to the WindowsEmbeddedSilverlightClockUpdate folder at %ProgramFiles%\Windows Embedded Silverlight Tools\WindowsEmbeddedSilverlightClockUpdate.
Select and copy all of the files in this folder to your source Expression Blend project, located at C:\ExpressionBlend\WindowsEmbeddedSilverlightClock, overwriting MainPage.xaml, Readme.txt, and WindowsEmbeddedSilverlightClock.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 Silverlight Tools update tool. The Windows Embedded Silverlight Tools update tool automatically updates your source files to reflect changes made to the source Expression Blend project. Although Windows Embedded Silverlight 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
Open your OS design project in Platform Builder.
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.
On the Tools menu item, click Windows Embedded Silverlight Tools, and then click Update Microsoft Silverlight for Windows Embedded Subproject.
Wait for the Update Windows Embedded Silverlight Tools Project progress window to show that the update has completed.
On the File menu, click Save All.
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
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
Although the designer made fundamental changes to the UI design of the Silverlight 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