Using Expression Blend

May 2, 2013 at 9:33 PM
Markus,

I opened a project and then a view in the 2012 Expression Blend that comes with VS 2012. When I did so, it had lots of errors. But the applications runs fine.

My guess is that I need to somehow configure Blend to know where to look for certain things.

Are there some things I can do with Blend so it understands how to work with the CODE Framework as well as that WPF does support things like a textbox, etc.?

Thanks
Coordinator
May 2, 2013 at 9:41 PM
Depends on what you open exactly. Resource dictionaries for instance should work pretty well. Views you can also open, actually, but since the views are so simple during design time, there a) isn't much reason to use Blend (in fact, Blend will likely just increase the XAML code 10-fold and make a mess of otherwise very clean code)., and b) what you will see is not going to be all that useful since much of the layout logic isn't brought in until runtime.

When Blend doesn't show CODE Framework stuff right, it usually comes down to one problem: Dynamic resource loading. In other words: Resources may not be available during design time, and thus Blend can get confused. This problem can be fixed however, since Blend allows defining "design time resources". So you can manually link the resource dictionaries you think will be used at runtime, for design time only. This should fix all the issues.


Markus
May 3, 2013 at 2:16 AM
Markus,

I have to create a lot of forms that look very much like winform forms. So I am planning to focus on the battleship theme as well as having to manually design many of the pages using some form of designer. Once I have that done, my next step is to start on a 2nd set of UI s that are much more flexible and automated (i.e. more based on the themes as designed by the CODE FW.) But for now, I have to keep the UI as close to the original version as possible.

Besides Blend, are there any other tools your recommend?

And, if I do have to create a layout that is similar to a winforms layout, are there any tips on doing so? I mean besides starting with the battleship theme?

Thanks,

Fletcher
Coordinator
May 3, 2013 at 6:30 AM
If you are coding the layout manually, then you can use Blend or Visual Studio. They will create a lot of XAML, but if you are not using any of the automatic layout options, that should be fine.

Note: You'd probably be surprised how much you can do with automatic layout. I should probably write another article about that, actually.


Markus