Select to view content in your preferred language

Reading XAML String into C# List

657
2
06-23-2011 06:21 AM
AnthonyJedamski
New Contributor
Hi, I am a newbie at C# and Silverlight, and I'm kinda stumpted. I'm working on a Silverlight web map that has a feature layer which queries a map service in XAML. One of the fields in this query is displayed within a Textblock on a Maptip. I would like to read this line of text (< 20 characters) into a list or array in Code-behind. I want to do this so I can compare that text line against a string list that I already have. Is there a way to do this?


Thanks!
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
I am not sure to understand what you want exactly, but did you try using a converter ? (i.e. instead of displaying directly an attribute in the maptip, use a converter to transform the text to whatever you want)
0 Kudos
GalTalmor
Emerging Contributor
Do you want to read a text block from your XAML and make it a string array in your code-behind?
You can use Binding with TwoWay mode, that points to a string property, and in the "set" clause you can seperate it to a string array as long as you want.
0 Kudos