How to access Silverlight 4 element like textblock from Javascript.
-
Saturday, September 10, 2011 6:37 AM
How to access Silverlight 4 element like textblock from Javascript.
All Replies
-
Wednesday, September 14, 2011 2:53 AM
Hi,
You can use findName to access the Silverlight Element, Please refer to the link below:
http://msdn.microsoft.com/en-us/magazine/cc163404.aspx
http://msdn.microsoft.com/en-us/library/cc189042(v=VS.95).aspx
Hope it can help you.
-
Wednesday, September 14, 2011 3:16 AM
Hi Preeti,
I think you are working with Silverlight Application. Yes you can create a scriptable property which holds the reference of the TextBlock. Also you can try another option. A scriptable object and its properties can be accessed from JavaScript. As an example you can create a scriptable property which will just return the Text value of the TextBlock.
Example:
[ScriptableMemberAttribute] public String MyText { get { return _textBlock.Text; } }You can learn how to work with scriptable class and attributes from the links below
-
Friday, September 16, 2011 3:26 AM
Thank Otomii Lu and Somnath Panja for your answers. My Issue is resolved with your help. Really very thankful to both of you.

