Simple Dependency Injection with XAML
- Posted: Jan 18, 2011 at 1:25 PM
- 3,085 Views
- 5 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
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.
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.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Great topic, but video has serious granularity problems :(
@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.
@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!
nice job! focused and demonstrable.
@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.
Remove this comment
Remove this thread
close