This is a migrated thread and some comments may be shown as answers.

RadTileViewItem Button

1 Answer 38 Views
TileView
This is a migrated thread and some comments may be shown as answers.
None
Top achievements
Rank 1
None asked on 14 Nov 2013, 05:08 PM
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.

1 Answer, 1 is accepted

Sort by
0
Milena
Telerik team
answered on 18 Nov 2013, 02:17 PM
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 >>
Tags
TileView
Asked by
None
Top achievements
Rank 1
Answers by
Milena
Telerik team
Share this question
or