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

update binded fields in tileviewItem

1 Answer 56 Views
TileView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 23 Dec 2010, 07:09 PM
Hello,
I'll try to simplify my problem. Lets say I create a class with a field named "Title". after creating a few objects of this class type. I set a textbox with binding in my TileViews SmallContent :
<TextBlock  Text="{Binding Title}" />

and add my objects to the TileView using "tileview1.Items.add()"

The initial view is good, but now I want to update this value. How do I refer to this field so it will be updated in the TileViewItem? 
I've tried to change the "Title" value in one of my objects ( which I added using "tileview1.Items.add()" ), but the value in the TextBox doesn't change.

Bottom line: how do I update a field which is declared in the tileviews dataTemplate?

Thank you

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 28 Dec 2010, 04:56 PM
Hi David,

We prepared a project for you demonstrating how to use the UiElement.ChildrenOfType<> method which allows you to find  elements defined in your datatemplate. On the other hand, in order to view the changes in your ViewModel immediately, your bound fields must use the NotifyPropertyChnaged method of the  INotifyPropertyChanged interface properly. You can inspect how it is achieved in the attached solution and let me know if it fully satisfies you or not.

Greetings,
Petar Mladenov
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
TileView
Asked by
David
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or