I am working on a XAMARIN App. I am calling open weather API and able to get JSON response.
After string format, I am able to show the City Name + Temperature in the Header (Title).
Still i couldnt bind the Image Icon.
Whatever Bind Image works in the Content Page, but not on the Title.
This piece of syntax is from my Tabbed Main Page .. which calls City Tab Page.
<NavigationPage Title="City" Icon="city.png">
<x:Arguments>
<local:CityPage />
</x:Arguments>
</NavigationPage>
and in the city.xaml.cs - I am calling this method.
public async void GetWeather()
{
Weather weather = await Core.GetWeather("07004");
if (weather != null)
{
this.BindingContext = weather;
string sWeather = String.Format("{0}°F", weather.Temperature);
this.Title = weather.Title + " " + sWeather;
}
}
Image Icon has to come at the end of the Temperature.
you should be able to bind the url to an image