Compartir a través de


Expression Blend and XAML for Windows Embedded (Compact 2013)

10/26/2015

Blend for Visual Studio and XAML for Windows Embedded, combined with Microsoft Visual Studio 2013 and Microsoft Visual 2015, offer an end-to-end development environment. Device designers and developers who create applications for Windows Embedded Compact 2013 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 XAML for Windows Embedded and how to use Microsoft Visual Studio 2013 or Microsoft Visual Studio 2015 with the Windows Embedded XAML Tools to create XAML for Windows Embedded applications. To create a XAML for Windows Embedded project in Expression Blend, you use the XAML 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 XAML for Windows Embedded project in Visual Studio, see Getting Started with XAML for Windows Embedded.

The Tools

Expression Blend gives designers a set of visual tools to create dynamic user interfaces for XAML 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 XAML 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 XAML 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 XAML for Windows Embedded applications, and the XAML for Windows Embedded Application project template generally 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 information about how to use Expression Blend, see the following resources:

XAML 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 XAML for Windows Embedded project or create the project in Expression Blend using the XAML for Windows Embedded Application project template. After you create your XAML for Windows Embedded project in Expression Blend, you use Visual Studio and the Windows Embedded XAML Tools to generate the C++ native code that a developer uses to implement the UI.

XAML 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 XAML for Windows Embedded applications in Expression Blend, you need to use the XAML 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 XAML for Windows Embedded API. For more information, see Unsupported Controls and Features in Expression Blend.

To use the XAML 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 XAML Tools ** option. The template is installed in one of the following folders:

  • On a 64-bit computer: %ProgramFiles (x86)%\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\CSharp\Silverlight\1033\WindowsEmbeddedCompact2013
  • On a 32-bit computer: %ProgramFiles%\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\CSharp\Silverlight\1033\WindowsEmbeddedCompact2013

If you do not want to install Windows Embedded Compact 2013, you can get the XAML for Windows Embedded Application project template from Windows Embedded Silverlight Tools - Download Center. You must manually copy the template files from %ProgramFiles%\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\CSharp\Silverlight\1033\WindowsEmbeddedCompact2013 to your local user directory at %Users%\<user-name>\Documents\Visual Studio 2015\Templates\ProjectTemplates 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.

To use the project template to create a new Windows Embedded Compact project in Expression Blend 

  1. On the File menu, click New Project.

  2. In the New Project dialog box, select the Windows Embedded project type, and then click XAML 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.

Tip

If you have an existing Expression Blend project that you plan to convert to a XAML for Windows Embedded project (for more information, see the section Windows Embedded XAML Tools below), save it in a folder on a path that does not include spaces. For example, save it in the C:\Users&lt;user_name>\Documents\Expression folder. The Windows Embedded XAML Tools require that there be no spaces in the folder name.

Important

If you create a project using a template other than the XAML for Windows Embedded Application template, your project will include XAML elements or features that are not supported in a XAML 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 XAML Tools to convert the Expression Blend code files into a XAML 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 XAML for Windows Embedded project combines the native C++ code files with the XAML from Expression Blend to complete the XAML for Windows Embedded application.

Windows Embedded XAML 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 XAML 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 XAML 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 XAML Tools, there will be a matching C++ Click event in your XAML 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 XAML for Windows Embedded Application Template. If you do not have Platform Builder installed, you can convert an Expression Blend project by using the XAML 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 XAML 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.

In This Section

See Also

Concepts

XAML for Windows Embedded Application Development