Forums

Locator pattern and 2 instances of the same user control
Last Post 11 Apr 2016 08:16 AM by Filip Dušek. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
A TUser is Offline
New Member
New Member
Posts:34


--
09 Apr 2016 03:54 AM
    I use 2 different instances of the same user control in one UIRoot. This control has 2 data grids, when user double-clicks on a row in the first of them, a new row is added to the second data grid. View model locator is used to bind a command.

    But both instances are bound initially to the first view model instance and then to the second one, as a result they are both bound to the second view model. So when I click on the first data grid in the first user control, a new row appears in the second control. Is there a way to fix this problem?
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    11 Apr 2016 08:16 AM
    View is located based on it's interface, so use one view or make your own locator pattern, which would handle your scenario.
    You are not authorized to post a reply.