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

Data binding: FluidContentControl

2 Answers 58 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Deepak Shakya
Top achievements
Rank 1
Deepak Shakya asked on 01 Dec 2010, 09:46 AM
Hi,

Scenario:

1. I have a data class. I create an instance of the class and populate the properties.
2. I have a UserControl with telerik controls. e.g RadMaskedTextboxes.
3. I create few instances of this usercontrol and in the process data bind the radmaskedtextbox to one of the properties in data class.
4. The usercontrol is assigned to the LargeContent of the Fluidcontentcontrol
5. Also, the maskedText of one of the controls within the usercontrol is used in the stackpanel, which in turn is assigned to Smallcontent
6. Run.
7. I can see that the data binding has worked and hence I can see the MaskedText in SmallContent
8. But I cannot see anything in the MaskedTextBox. (This is the same control whose text I can see in small content)
9. When I double click to change the small content to large content, even the value in the smallcontent dissappears or say, changes to zero.

Question:

1. What am i doing wrong?
2. What is the right way to achieve this?

Thanking you in advance.

2 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 06 Dec 2010, 04:37 PM
Hello Deepak Shakya,

I am not sure whether I understand your scenario correctly. Can you please have a look at the attached sample project and let me know if this is close to what you have in mind and if it works for you.

Best wishes,
Tina Stancheva
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Deepak Shakya
Top achievements
Rank 1
answered on 07 Dec 2010, 03:17 AM
Hi Tina,

Thank you so much for sending in the solution. It help me re-structure my code and understand the use of binding and resources better. I found out that I still had the binding value of zero in the "Loaded" event. Hence, I was still getting zero value instead of the value that I binded using the data class.

I am also using the "TilesStateChanged" event rather than the Converter. Will this be a problem?

Thank you once again for the great support and solution.

Cheers!
Tags
TileView
Asked by
Deepak Shakya
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Deepak Shakya
Top achievements
Rank 1
Share this question
or