views:

132

answers:

3

I am a bit confused on how Visual Studio 2010 and Expression Blend 4 operate together. If I want to create a WPF application, should I start it in Expression Blend 4? If so, then how does Visual Studio 2010 natively open Expression Blend projects, or does it?

Or should I start my application in Visual Studio 2010? If so, how do I open my solution in Expression Blend.

Also, how do I modify an existing WPF form, if I need changes. If I already have events handled and code behind, how do I bring it over to expression blend, make my changes, then bring it back to visual studio without disrupting the events and code that I have created in Visual Studio 2010?

Also can someone recommend a good book that covers how to create WPF and/or Silverlight applications using Expression blend 4 and Visual Studio 2010 together.

+2  A: 

Solutions are the same for Visual Studio and Expression Blend. You can open your solution thru the file menu in expression blend, or by right clicking on a xaml file in Visual Studio and select "Open In Expression Blend".

Personally, when I need to make only a small change, like changing the text on a button, I don't go into Blend. But when I want to see what's going on, with margins and layout and stuff I always use Blend. Most often I have Visual Studio and Blend open side by side and I keep switching back and forth.

Because Expression Blend uses the same solution you don't have to worry about event handlers and such. When they are in place, they stay in place. Unless you delete the control the event is attached to of course.

Creating a solution can be done in both tools, but I start most projects in Visual Studio. There are however a few Project templates that can't be found in visual studio. For example the Databound Application project type. This will give you a start on an MVVM project, with folders in place for the Model, View and ViewModel.

Sorskoot
+1  A: 

You can have it open in both Visual Studio and Blend at the same time. You're prompted in Visual Studio if you make a change in Blend and vice versa.

Personally I create the new application in Visual Studio first then open it in Blend.

Chris
A: 

I usualy start my project in Blend. Remember Blend is specially designed to make great UI, easy databindig, make easy templates and custom controls.

You can edit the code behind of your app directly in Blend but sometimes it doesn't show the intellisense; thats when you need open VS, to do that right click on your project inside blend and click on edit with Visual Studio. It'll launch VS and you can start coding.

You dont need to close VS or Blend, they booth can be open, if you make some change in VS it will notify Blend, will appear a dialogbox telling you: reload the app, click Yes the changes will be sincronized in Blend and VS, the same happens when you make changes in Blend and go to an already open instance of VS.

Too remember to install de VS tools, it will allow you to open Silverlight projects inside VS, if they arent already installed an error message will appear.

Hope my answer help you

Christopher Quesada