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?
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 >>