Answered When the item is selected, the command should be invoked

  • Thursday, September 22, 2011 3:48 AM
     
     

    I'm new to MVVM so maybe this is a dumb question but... I want to have a GridView where each item is associated with an ICommand exposed by the ViewModel.  When the item is selected, the command should be invoked.  The examples I've found of this kind of thing for Silverlight (example) all seem to depend on triggers.  Can I achieve this scenario in XAML without triggers?


    Robert Levy

All Replies

  • Thursday, October 13, 2011 2:35 AM
    Moderator
     
     Answered

    Silverlight doesn't have triggers, so the examples you've found don't depend on them (or implement them internally).  You should be able to use similar design patterns with Metro style Xaml.  The author of the MVVM Light Toolkit that you linked to has a Windows 8 preview version you might want to look at.

    --Rob