I have simple Page with ListView
<ListView x:Name="ForecastView">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding mainData.Temperature}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I'm trying to bind nested property by using .
to access it. My item source:
private ObservableCollection<ForecastData> forecast = new ObservableCollection<ForecastData>();
I'm setting it in constructor:
ForecastView.ItemsSource = forecast;
My model is looking like this:
public class ForecastData
{
public MainData mainData;
.....
public class MainData
{
public double Temperature;
...
After REST call my list is populated by elements (I can select them), but text property is blank. Can You help me figure out what is wrong. I have tried everything and nothing helps (I have read all similar question on Stack Overflow).