Reputation: 869
I am developing a Windows Phone app. There is an element in an XAML file, and I want to reference it in C#. Is there any equivalent of getElementById
used in JavaScript?
For example,
there are two text strings, one has Name
equal to 1
and another equal to 2
. User gives string input either 1
or 2
, accordingly the text is highlighted. Now, I want to convert this string input from user into reference, how that can be done ?
Upvotes: 1
Views: 593
Reputation: 15004
To find the element in the page tree based on a string use FindName method
Upvotes: 2