(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .

Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)

(31 votes)
Gill Cleeren
>
Gill Cleeren
Joined Apr 02, 2010
Articles:   63
Comments:   6
More Articles
11 comments   /   posted on Jan 17, 2011
Categories:   General , Media , Controls
SilverlightShow and Gill Cleeren start a series of materials aimed at helping you get prepared for taking Microsoft Silverlight Exam 70-506. Through this series we will try to structure the resources available on the internet, grouping them by topic covered in the exam. Any feedback would be much appreciated! Thanks! 

This article is Part 1 of the series on Microsoft Silverlight Exam.

Silverlight is a rapid-evolving technology. Over a time span of 3 years, it has evolved from being a JavaScript-based platform to a full .NET implementation. With 4 versions released and version 5 in the pipeline at the time of writing, Silverlight has more versions than .NET! That makes it hard for book writers such as me to keep up with new features being added.

It seems to me that it’s also difficult to create and manage exams about Silverlight. For the previous versions of Silverlight, there weren’t any exams available. Silverlight 4 is the first version of which an exam is being created. It was possible to take the beta-exam late 2010; the exam will be officially open in Q1 2011. More information about the exam can be found here: http://www.microsoft.com/learning/en/us/Exam.aspx?ID=70-506&Locale=en-us

With this guide, I aim to make the preparation for the exam a bit easier.

Goal and approach to getting ready

At this point, there’s no official courseware available to study for the exam. In any case, you should therefore be familiar already with Silverlight development. Reading some books on Silverlight will help as well. The list below contains some links to books available for Silverlight 4:

On top of that, reading articles and blog posts will help you in passing the exam. In this article series, I try to create an extensive list of links along with some explanation on the topic at hand that contain the information you need to know. To structure this, we’ll follow the list of topics described by Microsoft on the exam outline page (http://www.microsoft.com/learning/en/us/Exam.aspx?ID=70-506&Locale=en-us#tab2):

(Small note: the outlined percentages total 99%, so you’ll probably get 1% for entering your name!)

In this first part we’ll look at “Laying Out a User Interface”.

Part 1: Laying Out a User Interface

Arrange content with panels

Layout is a very important aspect in Silverlight. Since Silverlight is an RIA, applications we build with it are intended to run on different screen resolutions. A well-built application should look fine on all these resolutions as well. Luckily, Silverlight has inherited layout panels from WPF, including the Canvas, the Grid and the StackPanel. Via the Silverlight Toolkit, other panels including the DockPanel and the WrapPanel were added. It’s my opinion that the Grid is the most used panel for (business) applications, as it can help lining out content, while a Canvas will be more used for example when creating a game with moving parts or a “hand-drawn” custom control such as a gauge control. The Canvas support z-indexing as well, allowing sending its children up or down in the stack.

When looking at the outline, the following articles are helpful:

  • Layout in general:

Layout controls help building the user interface of Silverlight applications. The class hierarchy for the most important layout controls is as follows:

System.Object
--System.Windows.DependencyObject
----System.Windows.UIElement
------System.Windows.FrameworkElement
-------- System.Windows.Controls.Viewbox
--------System.Windows.Controls.Border
--------System.Windows.Controls.Panel
----------System.Windows.Controls.Grid
----------System.Windows.Controls.StackPanel
----------System.Windows.Controls.Canvas
--------System.Windows.Controls.Control
----------System.Windows.Controls.ContentControl
------------System.Windows.Controls.ScrollViewer

    • http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-2-using-layout-management.aspx
    • http://www.silverlight.net/learn/videos/all/silverlight-page-layout-part-1-xaml/
    • Under the covers of the Silverlight layout system: http://10rem.net/blog/2010/03/26/book-excerpt-the-silverlight-layout-system
  • The Grid:
    A Grid can be used to create a layout structure with rows and columns.
  • The StackPanel:
    A StackPanel can be used to place one or more of its children in a vertical (default) or horizontal layout.
  • The Canvas
    A Canvas allows us to position items explicitly using a coordinate value. We can compare the Canvas with a Windows Forms on which we drop control and they get an absolute position.
    • Canvas at MSDN (contains list of all properties and methods): http://msdn.microsoft.com/en-us/library/system.windows.controls.canvas(v=vs.95).aspx
    • http://www.silverlightshow.net/items/Using-the-Canvas-control-in-Silverlight-2-Beta-1.aspx
    • http://www.a2zdotnet.com/View.aspx?id=117
    • http://www.silverlight.net/learn/videos/all/using-the-silverlight-canvas/ (video)
    • http://www.c-sharpcorner.com/UploadFile/anavijai/4439/Default.aspx
    • Canvas Z-index: http://www.vectorlight.net/silverlight/tutorials/rendering_order_using_z-index.aspx
  • The Border:
    A Border can be used to draw a border around a control and a background color can be applied on it.
  • The ScrollViewer:
    A ScrollViewer can be used to scroll through content larger than the actual area.
    • ScollViewer at MSDN (contains list of all properties and methods): http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer(v=vs.95).aspx
    • http://www.silverlightshow.net/tips/How-to-make-a-control-scroll-its-content.aspx
    • http://www.c-sharpcorner.com/UploadFile/mamta_m/307312009072507AM/3.aspx
    • http://csharperimage.jeremylikness.com/2010/05/making-scrollviewer-talk-in-silverlight.html
  • The ViewBox:
    A ViewBox can be used to stretch a child to fill the available space.
    • ViewBox at MSDN (contains list of all properties and methods): http://msdn.microsoft.com/en-us/library/system.windows.controls.viewbox(v=vs.95).aspx
    • http://www.silverlightshow.net/news/How-to-center-and-scale-Silverlight-applications-using-ViewBox-control-.aspx
    • http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/11/18/silverlight-4-rough-notes-viewbox.aspx
    • http://www.bluerosegames.com/SilverlightBrassTacks/post/Viewbox-in-the-Silverlight-Toolkit.aspx
    • http://www.c-sharpcorner.com/UploadFile/mahesh/ViewBox03152009221804PM/ViewBox.aspx
  • Other related topics:
    • Controlling the Visibility: http://msdn.microsoft.com/en-us/library/system.windows.uielement.visibility(v=vs.95).aspx
    • Controlling the Z-Index: http://stackoverflow.com/questions/1802108/how-can-we-change-zindex-of-a-silverlight-control-programmatically
    • Star-sizing: http://www.byteblocks.com/post/2010/04/27/Silverlight-Grid-Layout.aspx
    • Positioning overview: http://msdn.microsoft.com/en-us/library/cc189087(v=vs.95).aspx

Implement and configure core controls

Silverlight has an extensive list of controls that gets bigger with every release until now (Silverlight 1.0 had no controls!). Most controls are living in the assemblies that are installed by default with the plugin (sometimes referred to as core controls). Others such as the DataGrid and the Calendar control are part of a separate assembly that gets added to your project (and XAP file) only when used. The main goal of this process is keeping the initial plug-in download size as small as possible. When such a control gets added to the page, we need to reference the namespace as well. If we do this using the designer in Visual Studio, this is done automatically for us.

Let’s look at the most common controls:

  • The TextBox (inherits from System.Windows.Controls.Control):
    A TextBox can be used to enter text by the user. It can display single-format, multi-line text.
    • TextBox at MSDN (contains list of all properties and methods): http://msdn.microsoft.com/en-us/library/system.windows.controls.textbox(v=vs.95).aspx
    • http://www.c-sharpcorner.com/UploadFile/mahesh/SilverlightTextBox12252008202141PM/SilverlightTextBox.aspx
  • The Button:
    Represents well yeah, a Button!
  • The TextBlock:
    A TextBlock can be used to display small amounts of text.
    • TextBlock at MSDN (contains list of all properties and methods): http://msdn.microsoft.com/en-us/library/system.windows.controls.textblock(v=vs.95).aspx
    • http://blogs.silverlight.net/blogs/msnow/archive/2008/09/24/silverlight-tip-of-the-day-45-text-formatting-with-the-textblock-control.aspx
    • http://www.silverlightshow.net/news/TextTrimming-TextBlock-for-Silverlight-.aspx
    • http://www.c-sharpcorner.com/UploadFile/mahesh/SilverlightTextBlock12282008230604PM/SilverlightTextBlock.aspx
    • http://www.dotnetfunda.com/tutorials/silverlight/text.aspx
  • The CheckBox:
    A CheckBox can be used to select or unselect an item.
    • CheckBox at MSDN (contains list of all properties and methods): http://msdn.microsoft.com/en-us/library/system.windows.controls.checkbox(v=vs.95).aspx
    • http://www.c-sharpcorner.com/UploadFile/mahesh/SilverlightCheckBox11282008214151PM/SilverlightCheckBox.aspx
    • http://www.vectorlight.net/silverlight/controls/checkbox.aspx
  • Content controls:
    A content control is a control that can contain any arbitrary content, such as another control. The ContentControl class is a base class that represents a control that can contain just one child. If more children are required, a container can be used a direct child.
  • Referencing namespaces
    When using controls that are is a namespace other than the default namespace (perhaps is a different assembly), namespaces need to be used inside XAML . Using these namespace, we can use 2 classes with the same name: assume we built our own Button class in some namespace, we can use both our own Button and the default Button. Using a namespace a a prefix for that namespace, we know which class we meant to use.
    • http://msdn.microsoft.com/en-us/library/cc189061(v=vs.95).aspx
    • http://www.silverlightshow.net/news/A-guide-to-cleaner-XAML-with-custom-namespaces-and-prefixes-WPF-Silverlight-.aspx

Create user controls

Creating our own controls in Silverlight is simpler than in other technologies. On top of that, there are several ways of doing so. The first and probably the easiest way is a user control. Such a control is nothing more than a combination of some existing controls. This can then be reused throughout our application. We can define dependency properties on a user control, so it can be used in combination with data binding and styling.

We can also define custom controls, where we override the control template. In such a case, we can use the Visual State Manager and the Parts and State Model. In this case, we define how the control should look in specific states. We’ll cover the VSM in part 2 of this series in more depth.

Take a look at the following articles to get understanding of user controls:

Implement a navigation framework

Silverlight 2 didn’t have real navigation built-in. It was only with Silverlight 3 that the Navigation Framework made its appearance into Silverlight. This is based on the concept of a frame that shows pages and takes care of navigating from page to page: it will load a different page into the frame. Navigation can be triggered from XAML or from code. The latter is done using the NavigationService, which exposes a Navigate method that we can use to navigate to another page. In Silverlight 4, an extension point has been added in the form of the INavigationContentLoader.

To learn more about navigation in Silverlight, take a look at the following links:

Display collections of items

Controls that display collections of items are indispensable. Silverlight includes the ComboBox, the ListBox, the TabControl and probably the most important one, the DataGrid. The latter can be used to display an Excel-like representation of data. The ItemsControl is a generic control for displaying lists of data. It can be compared to the ASP.NET repeater in some way. In many cases, these controls are templated. Using an item template, we can override how each individual item will be displayed.

The following links will help you understand these controls.

  • The ItemsControl
    This control can be used to display a list of items.
    • ItemsControl at MSDN: http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol(VS.95).aspx
    • Templating the ItemsControl: http://weblogs.asp.net/dwahlin/archive/2008/04/03/using-silverlight-2-itemscontrol-templates.aspx
  • The ListBox
    The ListBox is used to display a scrollable list of items.
    • ListBox at MSDN: http://msdn.microsoft.com/en-us/library/system.windows.controls.listbox(v=vs.95).aspx
    • http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-5-using-the-listbox-and-databinding-to-display-list-data.aspx
    • http://www.vectorlight.net/silverlight/controls/listbox.aspx
    • http://www.c-sharpcorner.com/UploadFile/mahesh/SilverlightListBox07212008115956AM/SilverlightListBox.aspx
    • http://johnpapa.net/silverlight/customize-a-listbox-template-with-silverlight/
  • The ComboBox
    The ComboBox control displays a dropdown with items in which the user can make a selection.
    • ComboBox at MSDN: http://msdn.microsoft.com/en-us/library/system.windows.controls.combobox(v=vs.95).aspx
    • http://johnpapa.net/silverlight/binding-to-silverlight-combobox-and-using-selectedvalue-selectedvaluepath-and-displaymemberpath/
  • The TreeView:
    The TreeView class shows a mostly hierarchical view of items.
  • The DataGrid:
    The DataGrid can be used to show items in a table-like format. The DataGrid was enhanced in Silverlight 4: new sizing features were added.

Play media files

Silverlight can since its first appearance play media (audio and video) very well. It includes support for HD content and supports DRM (which is good news for media companies, but less good news for all the rest of us!). The following links can help you understanding the media capabilities of Silverlight:

  • The MediaElement: http://www.c-sharpcorner.com/UploadFile/mamta_m/111292008005520AM/1.aspx
  • DRM in Silverlight: http://msdn.microsoft.com/en-us/library/cc838192(v=vs.95).aspx
  • Streaming content: http://www.learn-silverlight-tutorial.com/StreamingMediaUsingSilverlight.cfm
  • Playing multiple audio tracks: http://10rem.net/blog/2009/07/19/silverlight-synthesizer-source-code-–-mediastreamsource-raw-sound
  • Timeline marker events: http://openlightgroup.net/Blog/tabid/58/EntryId/65/Closed-Captioning-with-Silverlight-using-MVVM.aspx
  • Playback events: http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement_events(v=vs.95).aspx

Conclusion

After this long list of links, I hope you have a now deeper understanding of the topics we looked at. You should now have a solid foundation to build on!

Stay tuned for part 2 where we’ll look at preparing for the Enhancing the User Interface part of the exam!


Subscribe

Comments

  • -_-

    RE: Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)


    posted by Thanigainathan on Jan 17, 2011 19:25
    Very nice post. Please continue with the second part !
  • -_-

    RE: Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)


    posted by Senthamil on Jan 17, 2011 20:11
    Nice post, i would like to do the certification on it.
  • -_-

    RE: Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)


    posted by Beau on Jan 18, 2011 10:52
    Bring on part 2,3....
  • -_-

    RE: Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)


    posted by Jeroen Trappers on Jan 18, 2011 21:08

    Thanks! This is great!

  • -_-

    RE: Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)


    posted by Luciano on Jan 19, 2011 12:54
    Greate job! Commendable initiative !
  • -_-

    RE: Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)


    posted by Stone on Jan 21, 2011 09:39

    Great post - thanks!

    Do you know if I do have to prepare for MVVM ?

    Thanks

    Stone

  • -_-

    RE: Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)


    posted by Dakuma on Feb 02, 2011 18:24
    Excellent!  I'm looking forward to writing the cert :)  Official courseware would be nice though, perhaps after 5 is released.
  • chiara

    RE: Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)


    posted by chiara on Feb 02, 2011 20:05

    By the way, here are some thoughts on the exam by Manos Kelaiditis
    http://www.dotnetzone.gr/cs/blogs/mkelaiditis/archive/2010/10/25/taking-the-71-506-exam.aspx

    He shared this link + there's more feedback in this linkedin discussion:
    http://www.linkedin.com/groupItem?view=&gid=124074&type=member&item=42037720&qid=a96dc8e5-eaac-45c1-a802-e9b1f98b1651&goback=%2Egmp_124074

    Hope some other successful exam-takers will share their impressions from the exam here...

  • -_-

    RE: Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)


    posted by Gill Cleeren on Feb 02, 2011 20:17
    MVVM is not part of the exam as far as I know as a separate topic. However, commanding is, which is one of the pillars of the MVVM pattern.
  • -_-

    Silverlight 4 Exam (70-506)


    posted by DR on Feb 23, 2011 05:04

    Is Blend is also part of Silverlight 4 Exam (70-506)? If so is it available in Express edition? 

  • dasari_ramacharan

    Re: Getting ready for Microsoft Silverlight Exam 70-506 (Part 1)


    posted by dasari_ramacharan on Oct 15, 2011 15:41
    http://www.c-sharpcorner.com/UploadFile/mahesh/SilverlightCheckBox11282008214151PM/SilverlightCheckBox.aspx link is broken

Add Comment

Login to comment:
  *      *       

From this series