SlickThought

Simple Dependency Injection with XAML

Download this episode

Download Video

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

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • mark

      Great topic, but video has serious granularity problems :(

    • 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.

    • 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!

    • davewill

      nice job!  focused and demonstrable.

    • 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.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.