Passing the 70-506 Silverlight Exam

I took this test a few weeks ago and thought I would offer some pointers on how to prepare for this test.

I've been doing Silverlight development for over a year full time now, so that obviously helped out a lot. There are some questions about using a ViewModel and setting the right DataContext. So if you've only done code behind, you will be at a disadvantage.

A great resource is the Practice Testing Software from Self Exam Engine. I spent around $100 on this software but it was worth it. Many of the questions you will study are exactly the same on the real test. I would say at least 50% of the questions I had seen and studied.

The book Silverlight 4 In Action is great. And I used that as a study tool too. I would look at certain parts of the book where I didn't have that much experience, and take notes. Topics such as setting up an OOB and Printing will come up on the test.

silverlightshow.net has a great series on preparing for the exam. I went through each of their articles and looked at the links they provided. I would focus on the topics I hadn't worked with very much, or at all.

Using these resources I was able to finish the exam in about 75 minutes and score a 90%. They give you almost 3 hours, so you'll have plenty of time.

Silverlight is a big topic with many parts to learn. Even if you've used Silverlight quite a bit in your daily job, there will be topics on the test that you will not know the answer to. So study up, and you'll do fine.

My 13 Month Old Unlocked My Evo....

Kids really catch onto technology fast now a days.  Somehow he found the On button on the phone, and then started moving the lock slider around.  Finally he was able to drag it to the bottom of the screen, and baam!  Unlocked! 

He then moved my GPS on/off icon to a different screen.  I couldn't find it until I took a few minutes to track it down.  Now we'll see how long before my 7 year old figures out my Apple password for the App Store...

Silverlight Binding with the dynamic Data Type

Welcome to my fantastic blog, and very first blog post! In my first post I thought I would share my first experience with the .NET dynamic data type, while doing some Silverlight binding.

The scenario is I have a View, ViewModel and Model project. My Model project gets data from a WCF service, and sets the appropriate properties in the ViewModel. There's an ObservableCollection property in the ViewModel bound to a DataGrid in the View.

The data in the ObservableCollection can be filtered through a search within the application. I want a Label control to display the results of the search, such as "Your search returned 34 results". So I did something crazy! Binding the updated ObservableCollection to the Label. This could have been done with a separate property, being updated from the set of the ObservableCollection, but that approach was too boring.

So you may ask, how does a Label element bound to an ObservableCollection display text? Through the magic of binding converters...

XAML:

xmlns:conversion="clr-namespace:SampleBuddy"

<controls:ChildWindow.Resources>
<conversion:CollectionConverter x:Key="collectionConversion"></conversion:CollectionConverter>
</controls:ChildWindow.Resources>
 

<sdk:Label Content="{Binding WorkOrders, Converter={StaticResource collectionConversion}}" Foreground="Blue" Cursor="Hand"></sdk:Label>

WorkOrders is the ObservableCollection property from the ViewModel class, which implements INotifyPropertyChanged.

Converter Class:

namespace SampleBuddy
{
public class CollectionConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
string text = "Your search returned ";
dynamic collection = value;

if (collection != null)
{
text += collection.Count.ToString() + " results";
}
return text;
}
 

public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{return value;}
}
}
 

To better learn how to implement the converter, check out this article.

So I was able to bind to an existing property, and update the display whenever the collection changes from the ViewModel. Since I couldn't cast the object, because it was referenced from the ViewModel and not the View, the dynamic data type came in very handy.

Hope you enjoyed my first post.

JK