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

Binding to View Model properties in Data Templates. The RootBinding Markup Extension

(0 votes)
0 comments   /   posted by Silverlight Show on Jun 29, 2011
Tags:   data-binding , mvvm , markupextension , silverlight-5 , damian-schenkelman

Read original post at Damian Schenkelman's Blog

If you work with Silverlight and MVVM, you must have probably been forced to do some weird thing to bind to a property in your view model (say a Command) from a DataTemplate. Some of the common approaches I have seen and used myself are:
  • Using some kind of binding helper as a View’s resource.
  • Having a View Model wrap the entity of each collection item, and add the command to the View Model.


No comments

Add Comment

Login to comment:
  *      *       

Our News on Twitter