Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Expression Blend and Silverlight for Windows Embedded (Compact 7)

3/12/2014

Microsoft Expression Blend 3 and Microsoft Silverlight for Windows Embedded, combined with Microsoft Visual Studio 2008, offer an end-to-end development environment. Device designers and developers who create applications for Windows Embedded Compact 7 powered devices can use this environment to create first-class, cutting-edge applications in a wide range of device categories. This section provides an overview of how to use Expression Blend with Silverlight for Windows Embedded and how to use Microsoft Visual Studio 2008 with the Windows Embedded Silverlight Tools to create Silverlight for Windows Embedded applications. To create a Silverlight for Windows Embedded project in Expression Blend, you use the Silverlight for Windows Embedded Application project template as described in this topic.

For a detailed set of steps that show how to work with an Expression Blend project before and after it is converted into a Silverlight for Windows Embedded project in Visual Studio, see Getting Started with Silverlight for Windows Embedded.

Expression Blend gives designers a set of visual tools to create dynamic user interfaces for Silverlight for Windows Embedded applications and demonstrate them in a browser. Visual Studio, with Windows Embedded Compact installed, gives developers a complete set of tools for converting Expression Blend projects into Silverlight for Windows Embedded application templates, for developing the native C++ code that will drive the embedded application, and for testing the application on a device or virtual CEPC.

By using the tools described in this section, designers and developers can efficiently work on a project in parallel using Expression Blend and Visual Studio. For more information, see Designer and Developer Workflow in Silverlight for Windows Embedded.

Expression Blend

Expression Blend is a tool that you use to create graphics, animations, and user interfaces, mostly defined in XAML files. Expression Blend is intended to simplify user interface design by working like a paint program, but with features that you use to easily incorporate animation and interactivity with the elements that make up the visual appearance. With Expression Blend, you can quickly create the look for your application that is unique to your company or organization. What you see on the design surface in Expression Blend is what your users will see when they run the application.

A designer creates the look and interaction of an application using the Expression Blend workspace, visually designing the UI on the artboard. When the designer makes changes to the appearance of application elements or changes to interactions with the elements, those changes are automatically propagated from the Expression Blend workspace to underlying XAML files and managed code (Microsoft Visual C# or Microsoft Visual Basic .NET) files.

Expression Blend supports some features that are not available to Silverlight for Windows Embedded applications, and the Silverlight for Windows Embedded Application project template hides incompatible elements so that they are not available for use. For information about which features are supported, see Supported Controls and Features in Expression Blend and Unsupported Controls and Features in Expression Blend.

For an example of an Expression Blend project that already contains supported controls and styles, download the sample project Simple Styles for Silverlight for Windows Embedded.

For information about how to use Expression Blend, see the following resources:

Silverlight for Windows Embedded

To use an Expression Blend UI design on a Windows Embedded Compact powered device, you must convert an Expression Blend project, if it exists, to a Silverlight for Windows Embedded project or create the project in Expression Blend using the Silverlight for Windows Embedded Application project template. After you create your Silverlight for Windows Embedded project in Expression Blend, you use Visual Studio and the Windows Embedded Silverlight Tools to generate the C++ native code that a developer uses to implement the UI.

Silverlight for Windows Embedded Application Project Template

By default, Expression Blend includes two project templates: one for creating Windows Presentation Foundation (WPF) applications for the desktop and one for creating Silverlight applications for the desktop browser. To create Silverlight for Windows Embedded applications in Expression Blend, you need to use the Silverlight for Windows Embedded Application project template that comes with Windows Embedded Compact. This template hides some controls in the Expression Blend toolbox and some features that are not compatible with the Silverlight for Windows Embedded API. For more information, see Unsupported Controls and Features in Expression Blend.

To use the Silverlight for Windows Embedded Application project template in Expression Blend, install Expression Blend before installing Windows Embedded Compact. When you install Windows Embedded Compact, select the Windows Embedded Silverlight Tools option. The template is installed in one of the following folders:

  • On a 64-bit computer: %ProgramFiles(x86)%\Microsoft Expression\Blend 3\ProjectTemplates\en\Windows Embedded Silverlight Tools\Application
  • On a 32-bit computer: %ProgramFiles%\Microsoft Expression\Blend 3\ProjectTemplates\en\Windows Embedded Silverlight Tools\Application

If you do not want to install Windows Embedded Compact 7, you can get the Silverlight for Windows Embedded Application project template from Windows Embedded Silverlight Tools - Download Center. You must manually copy the template files from %ProgramFiles%\Microsoft Expression\Blend 3\ProjectTemplates\en\Windows Embedded Silverlight Tools\Application to your local user directory at %Users%\<user-name>\Documents\Expression\Blend 3\Project Templates\Windows Embedded Silverlight Tools so that Expression Blend can display the template in its New Project dialog box. Note that if the local user directory does not already exist, you must create it prior to copying the template files.

  1. On the File menu, click New Project.

  2. In the New Project dialog box, select the Windows Embedded project type, and then click Silverlight for Windows Embedded Application.

  3. Type a name for your project.

  4. Browse to a location for your project. Choose a folder path that does not include spaces. For example, C:\Users\<user-name>\Documents\Expression\.

  5. Click OK.

JJ823209.note(en-us,WinEmbedded.70).gifTip:
If you have an existing Expression Blend project that you plan to convert to a Silverlight for Windows Embedded project (for more information, see the section Windows Embedded Silverlight Tools below), save it in a folder on a path that does not include spaces. For example, save it in the C:\Users\<user_name>\Documents\Expression folder instead of the default C:\Users\<user_name>\Documents\Expression\Blend 3 folder. The Windows Embedded Silverlight Tools require that there be no spaces in the folder name.
JJ823209.note(en-us,WinEmbedded.70).gifImportant:
If you create a project using a template other than the Silverlight for Windows Embedded Application template, your project will include XAML elements or features that are not supported in a Silverlight for Windows Embedded project. Your XAML files will not display in Design view in Visual Studio, and your application will not run on your Windows Embedded Compact powered device until all of those unsupported features are removed. For a list of unsupported features, see Unsupported Controls and Features in Expression Blend.

Visual Studio

Visual Studio uses the Windows Embedded Silverlight Tools to convert the Expression Blend code files into a Silverlight for Windows Embedded project with files that contain appropriate native C++ code stubs. A developer then uses Visual Studio to modify the code files to provide the business logic for the application. The Silverlight for Windows Embedded project combines the native C++ code files with the XAML from Expression Blend to complete the Silverlight for Windows Embedded application.

Windows Embedded Silverlight Tools

In an Expression Blend project, XAML files are created with corresponding code-behind files. A code-behind file defines a partial class that is completed by the XAML file. The code-behind files in Expression Blend are created by using managed code written in Visual C# or Visual Basic .NET, which Silverlight for Windows Embedded does not support. Additionally, the Visual C# or Visual Basic code-behind files that are automatically generated inside an Expression Blend project are not usable by Windows Embedded Compact applications, so Visual Studio uses the Windows Embedded Silverlight Tools to convert the Expression Blend code files into files that contain appropriate native C++ code stubs. For example, if you create an event handler method in an Expression Blend project to handle the Click event for a named Button, then after the Expression Blend project is converted using the Windows Embedded Silverlight Tools, there will be a matching C++ Click event in your Silverlight for Windows Embedded application.

For detailed steps that show how to convert an Expression Blend project to a Platform Builder subproject in Visual Studio, see Convert an Expression Blend Project to a Silverlight for Windows Embedded Application Template. If you do not have Platform Builder installed, you can convert an Expression Blend project by using the Silverlight for Windows Embedded Application project template when you create a new project. For more information, see Create Your Application Using an SDK for an OS Image.

As designer and developer work in parallel, the developer should periodically import the XAML changes and additions into the Visual Studio project using Windows Embedded Silverlight Tools. Each change the designer makes automatically modifies the underlying XAML and managed code files in the Expression Blend project, so periodic imports will facilitate the development process.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.