I retrieve weather data trough an internet link (xml) the data (condition) inside that xml is linked via data binding in a text block named "hulptextblok".
Now I would like to use the if statement on that textbox but I get the error saying that the is not found.
This is because the textbox control is located inside a data template.
I have beentrieng for over 2 days toget it to work but with no succes
I just Hope that you can shed some light on this problem. :-)
Xaml:
Xaml.cs:
if (hulpBlock.Text == "Partly Cloudy") { weatherframe.Source = (ImageSource)new ImageSourceConverter().ConvertFromString("WeatherIcons/03.png"); }
So what want is that if the text that is recieved inside the textbox matches "Partly Cloudy" the image source to change to "WeatherIcons/03.png"
Replies
Know the answer? Post it — somebody with the same question will find it here.