codefoster | Blend: Design, Execute, Interact
Jeremy Foster
@codefoster

Blend: Design, Execute, Interact

by Jeremy Foster 16. April 2012 10:24

This is likely apparent to anyone that has already ventured into Windows 8 development using Blend for Visual Studio 11, but if you haven’t ventured in yet for some reason… like say you’re busy actually getting work done! I know how that goes. I was recently in industry trying to meet deadlines and didn’t have much opportunity to look at new technology.

So allow me to quickly highlight an incredible feature in Windows 8 development – specifically in Blend for Visual Studio 11.

Why Use Blend?

First of all, why and when should you open Blend? For a long time, Blend was downright offensive to me as a developer. I was and still am a Visual Studio guy. I don’t want another IDE offering in parallel to confuse and divide me! But now I’ve accepted the two tools as very different and each very powerful in their own role.

Some people will almost always use Visual Studio. Remember that the Express version is completely free. How do you know if you’re one of these people? Simple. Look down. Are you wearing one of these t-shirts right now?

image

If so then chances are you’re a geek and Visual Studio may be your primary if not your exclusive tool.

Are you wearing something more like this?

image

If so then you may call Blend your home and ask a geekier friend to write the actual code for you. If you’re like me, you might wear many hats (and shirts) and be able to geek out in the code and the design tools.

Design, Execute, Interact

But right now I want to show you something that is exclusive to Blend. That is its ability to execute your application live as you design it and its ability to even give you interaction with the application and why you need that.

image

The figure above is what it looks like when you’re designing an application in Blend. The interesting tidbit of note is that those recipes you see in the design pallet are not declared in the HTML. They exist as JavaScript arrays in the data.js file and as images of food (yum) stored in the images folder.

Blend here is executing the application, running the JavaScript, and rendering the recipes accordingly on the screen. So just this is pretty awesome. Remember in Expression Blend days of old when we loaded sample data so we (designer role) could get an idea of what things looked like. Those are bygone days, my friend.

In this mode, we can actually grab one of the images (even though they’re being rendered live!) and resize it (see next figure) - effectively modifying the size of the image element in the item template utilized by the ListView control that forms this list.

image

But what about when you want to do some design on a different page. Say we want to resize the recipe image on its detail page as well. If we were actually executing this application, we would touch on the recipe to get to this page. But remember that we are actually executing this application. We just have to tell Blend that we want to interact with it. And to do that you hit the Interactive Mode icon (image) on the right side of the tab well. This hides all of Blend’s panes and puts you in a mode where input is passed on to the application (see next figure).

image

Now a click on a recipe takes you to the item’s detail page…

image

You can now click on the Interactive Mode icon again to turn it off…

image

…and now you’re ready to do some design on this page.

That’s all for now. Let the power and potential that is Blend sink deep. Now use it to create an awesome app.

Happy Blending!

Tags:

Windows 8

Comments (4) -

Simon
Simon United States
4/25/2012 9:53:44 PM #

Hi Jeremy:
   I enjoyed your presentation at the event a lot, especially that joke on the shirts. By any chance, can you share a link to download the source code of this wonderful cook app that you demo'ed?

Thanks
Simon

Reply

Jeremy Foster
Jeremy Foster United States
4/26/2012 9:09:31 AM #

Thank you. Unfortunately, I can't share the Contoso Cookbook app directly, but if you attended the Code with the Experts session after dinner remember that Alice gave you a link to it that will only be up until next Monday. If you don't have that link then let me know via email.

Reply

Simon
Simon United States
4/26/2012 10:11:07 AM #

Unfortunately, i couldn't stay for the hackthon. can you send me the link via email? Thank you so much. simon(dot)jia(at)demandmedia(dot)com

Reply

jeremy
jeremy United States
5/9/2012 11:16:22 PM #

Sorry, I didn't get to this in time. The Contoso Cookbook labs should be posted on the Dev Center at some point in the (hopefully) near future.

Reply

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Feed Subscribe