I want to get the first data when opening my page but it doesn't. I don't know where I made the mistake. Can someone help?
This my Code;
Xaml
<Picker FontSize="15"
SelectedItem="{Binding SelectedObject}"
VerticalOptions="StartAndExpand"
HorizontalOptions="FillAndExpand"
ItemsSource="{Binding myList}"
ItemDisplayBinding="{Binding Title}">
ViewModel
public myViewModel()
{
GetList();
SelectedObject = myList[0];
}
public myClass _selectedObject;
public myClass SelectedObject
{
get
{
return _selectedObject;
}
set
{
_selectedObject= value;
OnPropertyChanged("SelectedObject");
}
}
Class
public class myClass
{
public int ID { get; set; }
public string Title{ get; set; }
public string Desc{ get; set; }
}