RadTileViewItem Button

2 posts, 0 answers
  1. None
    None avatar
    25 posts
    Member since:
    Nov 2013

    Posted 14 Nov 2013 Link to this post

    I have a button inside a RadTileViewItem. When this button is clicked, I would like to be able to get access to the ViewItem's model object. How would I go about doing this?


    Thank you.

  2. Milena
    Admin
    Milena avatar
    201 posts

    Posted 18 Nov 2013 Link to this post

    Hello Laura,

    If you use an MVVM pattern to populate the data in the RadTileVIew and want to access the ViewItem's model object via Button, I suggest you use a Command. So, when the user clicks a button in the View, a command on the ViewModel will execute to perform the requested action. 

    I'm attaching a sample project that demonstrates this approach. The scenario is very simple - we have a RadTileView bound to a ViewModel and in each RadTileViewItem we have a Button. On a button click, the Description Property in the ItemViewModel is changed.

    I hope this information helps.

    Regards,

    Milena
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top