Design time resources in Expression Blend 4

Design time resources in Expression Blend 4

Design time resources are very useful while we working with design on Expression Blend, resources will apply at run time, this will not be a problem for developers, but it is most important while we working on design tasks .  If your design surface can’t find the resources at design-time your design will not display properly as we see it on run-time, so that we cannot work on design, also we get  XAML parsing errors. Expression blend will show a message box which will looks in the following image.

(This message box will appear when we miss any resources that are linked with Style=”{}” property, and blend tries to find out the appropriate resource in the existing resource dictionaries in the solution if it is not found, then throws the above message box to fix the problem)

in this message box, Expression blend 4 provides us the available resource dictionaries, if we select one of resource from dropdown blend creates a new resource file called DesignTimeResources.xaml. and this will store in properties node of Silverlight project in the solution.Check the below image

Blend will now find the missing resources during design-time and be able to render the design surface properly.This feature enables editing of resources in dynamic styled applications to be much easier. If you open the DesignTimeResources.xaml, you will see the following xaml code.

if you remove the <resourceDictionary.MergedDictionares> tag you will get the same message box again.


Customizing Silverlight Child window title/Adding Image on title

Today I have found a nice feature of child window control in Silverlight and. I had a requirement in my project to display a image beside the window title after some R&D i found that it is having a property is an “Objecy” and I assumed that it could be act as a contentPresenter/ContentControl.

we can do it like this:

<sdk:ChildWindow          xmlns=”;


xmlns:sdk=””                x:Class=”SilverlightApplication1.ChildWindow1″

Width=”400″ Height=”300″>


                                <StackPanel Orientation=”Horizontal”>

                                                <Image Source=”Profile.png” Width=”24″ Height=”24″ />

                                                <TextBlock Text=”Add User” Margin=”15,5″ />



<Grid x:Name=”LayoutRoot”>


<RowDefinition />

<RowDefinition Height=”Auto” />


<Button x:Name=”OKButton” Content=”OK” Click=”OKButton_Click” Width=”75″ Height=”23″ Margin=”0,0,79,0″ HorizontalAlignment=”Right” Grid.Row=”1″ />

<Button x:Name=”CancelButton” Content=”Cancel” Click=”CancelButton_Click” Width=”75″ Height=”23″ HorizontalAlignment=”Right” Grid.Row=”1″ />