Modify a code-behind file

To edit a code-behind file in a Blend for Visual Studio 2012 project, you can double-click the file name in the Projects panel.

If the file is a code-behind file written in C# or Visual Basic .NET, the file will open in the Blend code editor. The code editor includes find-and-replace functionality and IntelliSense.

If you have Microsoft Visual Studio 2012 installed, you can optionally open the code-behind file in Visual Studio.

Tip

For more information about working with code in Blend applications, see Visual design compared to writing XAML and code, Debug Blend applications in Visual Studio, and Debug applications.

To open a code-behind file in Blend

  1. In Blend, in the Projects panel, expand the node for your document (for example, MainWindow.xaml) to see the code-behind file.

  2. Double-click the code-behind file.

To open a code-behind file in Visual Studio

  1. In Blend, in the Projects panel, expand the node for your document (for example, MainWindow.xaml) to see the code-behind file.

  2. Right-click the code-behind file, and then click Edit in Visual Studio.

    Tip

    When you open a single code-behind file in Visual Studio instead of opening the entire project and then the file, you cannot use the auto-complete, Build, and Debug features of Visual Studio.

To open a Blend project in Visual Studio

See Also

Tasks

Debug Blend applications in Visual Studio

Concepts

Working with XAML

Debug applications

Deploy and publish applications