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

How to bind the ItemClick event to a Command and pass the clicked item to it

(0 votes)
0 comments   /   posted by Silverlight Show on Mar 08, 2013
Tags:   winrt , marco-minerva

Read original post at Marco Minerva's Blog

The ItemClick event of GridView and ListView in WinRT contain an ItemClickEventArgs argument that allows us to retrieve the clicked item. These controls don’t expose a Command property that can be binded to a property in a ViewModel. So, if you want to follow an MVVM approach and we need to execute a command when an item is clicked, we have two alternatives.


Comments

No comments

Add Comment

Login to comment:
  *      *       

Our News on Twitter