Simple Dependency Injection with XAML

Sign in to queue

Description

Have you ever wanted the flexibility of dependency injection without having to implement a full-blown IoC solution?  Maybe you just want an easy way to pass concrete services to your ViewModel?  This short video will show you you can use XAML to configure your ViewModels to provide a property-based dependency injection solution.  You can also read a full write up and download demo code on my blog.

Tags:

Silverlight, XAML

Embed

Download

Download this episode

The Discussion

  • User profile image
    mark

    Great topic, but video has serious granularity problems :(

  • User profile image
    JeffBrand

    @mark: Hi mark.  Sorry for the video problems.  I messed something up somewhere along the way.  I have re-processed the vid and the HiQuality files are much better.  The default vid may still be choppy depending on bandwidth.

  • User profile image
    mark

    @SlickThought: Video is clear now :)     You've done a nice job of isolating DI-->XAML without getting the viewer lost in a complex example.  Well worth the viewing!

  • User profile image
    davewill

    nice job!  focused and demonstrable.

  • User profile image
    JeffBrand

    @cellra: I am constructing the dependency in XAML and then binding it to the property I want to inject into.  There is no code behind used for the injection itself.

Add Your 2 Cents