I have created a list of stores added it to a picker but from the views it is not loading. It is showing a picker with no items.
ViewModel code as follows
public List<string> Stores = new List<string>
{
"store 1",
"store 2",
"store 3"
};
private int _selectedStoreIndex = -1;
public int SelectedStoreIndex
{
get { return _selectedStoreIndex; }
set
{
if (_selectedStoreIndex != value)
{
_selectedStoreIndex = value;
UpdateStoreSelection();
OnPropertyChanged();
}
}
}
Xaml file
<Picker ItemsSource="{Binding Stores}" SelectedIndex="{Binding SelectedStoreIndex}"/>
OnStart/OnSleep/OnResumeto calculate the running time. - Junior Jiang