Create a Resource in Expression Blend

Heres a small guide to how you get started creating resources inside Expression Blend and place it any given resource dictionary.

1.  Select a given Framework Element in the Objects and Timeline tab. In this example we will Select a TextBlock.



2. Select the Foreground property and change the color in the Color Editor inside the the Property tab.





3. Click the white square and choose: Convert to new resource.

Tip: The white square means the property have a value set locally on the page or in the control and that it's different from the default template. 

Tip: You can reset to the default template anytime by clicking the square and then click Reset.

4. Name (unique key) the resource, choose in what resource dictionary you want to define the new resource in and then click OK.



5. DONE! You have now created a new resource and applied it to your textblock.

You can see it has been added to your TextBlock by the white square you clicked before, is now green.

If you look in the XAML - the resource is now created, and your TextBlock is actually already using it by referencing it using the StaticResource.

Pro tip:
In Blend you have a tab called resources - check it out. It gives you a complete overview of all the defined resources inside your project. You can copy, delete, edit and move the resources as you like. Most people don't know about it but it offers a great overview that I use offen when ever I work with resources.. 

Pro tip 2:
The tutorial above actually works in Visual Studio's properties panel when using the designer as well.


Feel free to reach out to me if you have any comments or difficulties with resource creation.

P.S Make sure you follow me on twitter @deanihansen for more news, design tips, articles and how-to's.

Create a "Open in Blend" Visual studio keyboard shortcut

A few months ago, I created a new shortcut in Visual Studio that enables me to open my active file in Blend. Soon I realized that I should have done that a long time ago. - now it’s my favorite shortcut that boosts my productivity.
No more using the mouse to right-click > Open in Blend.
I choose the press shortcut combination CTRL + K, CTRL + B – works like a charm.

Here's a quick tutorial to set your own keyboard shortcut to Open active file in Blend:

  1.  TOOLS > Options… - Environment > Keyboard
  2.  Show commands containing: type in blend - Choose: View.View.OpeninBlend (notice it’s NOT View.OpeninBlend
  3. Make sure you have the following setting: Use new shortcut in: Global - Set your own Press shortcut keys combination 
  4.  Click Assign
  5. Click Ok

You're now all set. Feel free to ping me if you have problems getting it to work. Enjoy your new keyboard shortcut.

P.S Make sure you follow me on twitter @deanihansen for more news, design tips, articles and how-to's.

New Expression Blend resource on Channel9

Channel 9's DevRadio, by Jerry Nixon, recently looked at some of the new things with xaml and Expression Blend. Here is one thing you should definitely check out:

Building your Windows 8 Apps with XAML and Blend Navit Saxena and Hari Menon from the Microsoft Blend team to the show as they discuss the latest features and improvements made in Blend as it pertains to XAML developers and its integration with Visual Studio 2012