Author: Sorcerdon | Posted on: 6/23/2008 3:46:47 PM | Views : 264

Hello Experts,

Got a little issue.
I am creating a Silverlight 2 Beta 2 application and cannot find a way to dynamically reference a control.

In my XAML file I have created 10 Canvases. Each is named Cn1, Cn2, Etc.
These canvases are originally (at the start of the application) are out of my main canvas (CenterCanvas is the name of that canvas). They cannot be seen.
Now I want to change the position of these smaller canvases depending on some data in a XML file. They will be positioned in a location in my CenterCanvas depending on XML file data.

I have read data using LINQToXML and now I want to change the position of Cn1 (change the Left and Top properties).
The problem is, I need to first dynamically reference a canvas (Cn1) usinga function like FindControl("Cn1"), but FindControl does not appear to be one of the options of my CenterCanvas. (CenterCanvas.FindControl(---) doesnt work)

I tried using ...

Go to the complete details ...