Going "extreme" with Silverlight 3 [Sharing the source code for a real-world sample application]

This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of dlaa.me.

See you there!

Comments (15)
  1. DarthObiwan says:

    I think the biggest thing missing that would make this a world class real world example of a data intensive app would be Navigation/Deeplinking. These days it’s am must have.

    http://cesso.org/Samples/HeadTraxExtreme/#Iron+Man or something like that.

  2. David Anson says:

    Great suggestion, DarthObiwan! If I get a chance to do more with this, I’ll definitely look at adding support for something like that. ๐Ÿ™‚

  3. CiaranMurphy says:

    Hi… nice simple demo. I noticed you used a attached property to select/highlight a TreeviewItem when the current employee changes. I used a static extension class provide by Justin Angel to do the trick…

    Both workarounds still involve some small code in the view (if trying to adhere to MVVM).

    Do you know if the selected Item will be made ‘fully’ settable on the treeview.

  4. BenHayat says:


    FYI, the app [directly from the site] doesn’t run in FF3 (just shows 100%), however it runs in IE8.


  5. BenHayat says:

    Usually Treeviews are used to show hierarchical data relations, like Customer -> Orders -> line items. And grids are to use flat data (within each level). Now, I’m confused to see you’re mixing Treeview and Grid showing the same data.



  6. David Anson says:


    Thanks – glad you liked it! It’s funny you mention the TreeView trick – that’s one of the things I’m working on a dedicated post to discuss. ๐Ÿ™‚ I hope to post tomorrow or the next day, maybe, so be on the lookout for that if you want more explanation.

    If you’re asking about whether SelectedItem will become settable, you might vote for this CodePlex work item: http://www.codeplex.com/Silverlight/WorkItem/View.aspx?WorkItemId=966. As I understand it, though, this would be a behavioral change from the WPF TreeView, so it’s possible we won’t be able to do it. So if you want it, be sure to vote! ๐Ÿ™‚

  7. David Anson says:


    I don’t actually see the same Firefox problem you’re reporting. I’ve just installed the Windows 7 RC on a blank Virtual Machine, installed Firefox 3.0.10, and then the Silverlight 3 Beta. The HeadTraxExtreme live sample link (http://cesso.org/Samples/HeadTraxExtreme/) loads and works correctly for me on both Internet Explorer 8 and Firefox 3. Perhaps you’ve got an older build of Firefox or something else is interfering on your machine?

    Regarding your question about TreeView vs. DataGrid, I’ve really got them both just because that’s what the application I was copying did. ๐Ÿ™‚ But honestly, I think they’re both valid: the TreeView is really great at visualizing the hierarchy while the DataGrid makes it easy to do company-wide sorting on any data field by clicking on the columns. Then I added in the ComboBox to enable DataGrid Grouping so that it could approximate some of the same hierarchical usefulness of TreeView while maintaining its ability to quickly navigate the entire data set.

    You’re welcome to disagree, of course – if nothing else, this was a good way to exercise two of the more complicated controls. ๐Ÿ™‚

  8. BenHayat says:


    Just checked and my FF3 is the same as yours (3.0.10) running on Vista and I have SL 3 beta on this machine. I’ve been seeing this problem lately (ever since SL3 beta came out) that some sites gets stock on 100%. I’m not sure what it is, but I hope it goes away as of SL3 RTM.

    As far as the grid and treewview, my intention wasn’t to disagree with you, but mainly wanted to know if the data was designed as a self-referencing hierarchical data or flat data?


  9. BenHayat says:

    FYI: I just rebooted the machine and tried your site and is working.

    I need to find out what causes it to report to SL team.



  10. Delay's Blog says:

    Earlier this week I wrote about the "app building" exercise my team conducted and posted my sample application

  11. CiaranMurphy says:

    Cool… Well I was trying to use a view model that has the notion of a current Location/User/Wotsit etc. With a listbox you can easily have two way binding without have to hook the controls SelectedItemChanged Event.  

  12. rolfg@teragon.de says:

    In your list of supported controls/concepts you mention the M-V-VM pattern. But where are the viewmodel class and the commanding?

  13. David Anson says:


    Sorry for the confusion! When I added "M-V-VM" to the list, what I had in mind was the technique of manipulating TreeView’s IsExpanded/IsEnabled properties in the model rather than directly on TreeViewItem. In the case of my simple sample application, the Employee class acts as both the model and the view, but the TreeView concepts are just as relevant as they would be in a larger-scale app. I called this out specifically because I went on to write more about handling a Silverlight-only complication with the pattern here: http://blogs.msdn.com/delay/archive/2009/05/07/one-more-platform-difference-more-or-less-tamed-settervaluebindinghelper-makes-silverlight-setters-better.aspx

  14. jtoth says:

    cool post but it got me all excited because it said it used mvvm and datagrid/dataform, which is what i was looking for, but it doesn’t actually use the mvvm pattern at all…

  15. David Anson says:


    Sorry for the disappointment – I explain in the comment just before yours what I had in mind when I said "MVVM".

Comments are closed.

Skip to main content