I'm trying to bind an array to list view. It's not binding and showing blank. I used Model class to place array.
View Model:
public class RunningLateOptions
{
public string[] runningLateOptions = new[] { "30 Mins", "1 Hour", "1:30 Hour", "2 Hours" };
public string[] runningLateOption
{
get{ return runningLateOptions; }
}
}
XAML code:
<ListView x:Name="RunningLateOptions" ItemsSource="{Binding RunningLateOptions}" ItemSelected="runningLateSelectedItem">
<ListView.ItemTemplate>
<DataTemplate>
<Label x:Name="listItems" Text="{Binding runningLateOption}" HorizontalTextAlignment="Center"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I'm not able to understand what's wrong with this. Help me.