When to use Blend for a WPF developer? - wpf

I'm a WPF developer and use VS Pro 2012 everyday for UI adjusting and coding. I installed Blend for Visual Studio but I never used it (just launched it by accident several times).
I'm afraid that I missed something by not using Blend. If I did miss something, what is it then?

Blend lets you design WPF UI, create controls and determine their behaviors visually (by UI), and Visual studio lets you do that programatically.
There is nothing you can do in blend, that you can't do in visual studio.
It is a tool for people who are less comfortable using code, and more comfortable using a cool UI to create custom controls and behaviors and design thier UI

In Visual Studio 2012 and later, the WPF UI designer is Blend; it's actually loaded in the background and accessed through out-of-process COM interfaces. This is part of the reason its behavior can be a bit bizarre at times, why you get messages about being able to edit the XAML while the design surface is loading.
If you're used to VS form builders you're going to be fine with Visual Studio.

Related

Expression Blend for VS2012

I have been developing in WPF using VS2010 for a few months now and have just upgraded to VS2012 Professional and noticed it comes with Blend for VS.
Is this expected to replace GUI design in VS or is it for doing "extra" bits that cant be done in VS?
I want to know if I need to spend time learning this new tool?
Blend is primarily used to make designing your app easier. It can be used to replaced the Visual Studio designer but it's better to use VS to create the backend code. Assuming you have the same project opened in VS and Blend, when you make changes in one, the other will ask to reload these new changes.
Blend makes it a lot easier to write your XAML (since it's a WYSIWYG editor) but also provides easy access to some of the more complicated aspects such as data binding. You could do all this in VS, and by hand, but Blend just makes it more efficient. It also has nicer workflow features from a designer perspective such as having the ability to zoom in and out.
You don't have to learn to use it, but I prefer using Blend for the GUI design and VS for the code-behind.

Does Expression Blend and Visual Studio Render WPF Controls Differently

In my WPF App, I have designed the Form using Expression Blend. To my surprise, the rendering is quite different when I load the solution using Visual Studio 2008. What is even more surprising, when I run the application, the resulting UI is different from the rendering done by both VS and Blend. Though I have not provided by XAML code, but in general is this a known Issue?
This is most definitely a known issue. Visual Studio uses what's known as the Cider designer to render WPF code. It most definitely renders XAML differently from Blend. Cider in VS2008 is pretty terrible, but gets much better in 2010 (but is still pretty terrible compared to Blend). One of the main differences between Cider and Blend is that Cider will read the code behind file (*.xaml.cs) while Blend will completely ignore it. Another notable difference is that Cider doesn't really understand things like Visual States and Blend SDK Behaviors (especially when you mix the two) while Blend completely understands them.
If you're constructing your view classes where you set your DataContext in XAML and then provide design time data (using Blend or a view model locator), you'll find that there are very few differences between Blend and how something actually looks at runtime.

XAML editing options

I use Visual Studio 2010 for WPF development of desktop apps. I edit my XAML with the visual editor, often tweaking it manually. My code-behind is C#. I haven't had any particular problems with this arrangement.
What are the advantages of Expression Blend over Visual Studio for editing XAML? Why is Expression Blend so expensive (it's more expensive than I paid for Visual Studio!!) Are there other full-featured XAML editors which are cheaper? (I'm not talking about free ones like kaxaml - those are too limited)
Thanks in advance.
Expression Blend does not come stand alone any longer; it is part of Expression Studio which also provides SketchFlow, Design, and a couple of other tools.
Visual Studio is geared towards the development aspect while Expression Blend is geared towards the design aspect. Building animations and performing binding all within the UI of Expression Blend is possible; not forcing you to modify the XAML by hand. You can however modify the XAML directly within Blend as you can the C# code behind as well.
I typically use Blend to lay out the UI and then make use of Visual Studio for the code behind and tweaking of the XAML. Blend is definitely a nice tool to have within your tool belt and I would recommend you download the trial to get a better understanding on the offering.
I find that the main advantage of Blend is that the UI makes it very, very easy to create complex animations and transitions - really gorgeous user experience things - but you need to spend some time 'learning' Blend to do it. To write the XAML in Visual Studio to create the same effects would be much more difficult - Blend does it much quicker, and you can preview the results instantly. It's not easy (if it's even possible - I've honestly not tried the more demanding stuff) with Visual Studio.

WPF Creation versus Visual Studio Creation

I created a form in WPF and it looked great. When I opened it in Visual Studio 2010, it look alot different than what I created.
Any ideas why this would happen? Should I ignore how it shows up in VS? This makes me wonder if either is how the user will actually see it.
Any suggestions?
Thanks again!
Eroc
The Visual Studio view of your WPF form is the designer view. Designer views of WPF forms, or really any other design of a UI component, will often differ in dislpay vs. the actual running component. Some of these differences are intentional to make design easier and some are just limitations of not having the WPF element actually running in a program (lack of certain runtime data bindings for example).
I wouldn't worry about it unless it starts looking incorrect when running.

visual studio 2008 IDE not displaying UI control properties

When I return from debug mode, my visual studio 2008 environment takes a really long time to display the properties of a UI control (e.g. text box) I click on.
why does this happen? Is there a hotfix or update for this from microsoft?
Thanks for any help in advance.
Subbu
If you are using WPF, then this might be normal :) VS doesn't have a very quick WPF UI designer. Get Expression Blend, its designed for such things. If you're using WinForms, I'm not sure. I've often felt slowdowns when using 3rd party WinForms controls, such as Telerik or DevComponent's DotNetBar, but it is because references to these controls bring in huge DLL's of which you often only use a small portion of. It leads to bloat, which can slow down a UI designer. Hope this helps.

Resources