Class 如何使用对象绑定源项?

Class 如何使用对象绑定源项?,class,xaml,xamarin,Class,Xaml,Xamarin,我不能装订。 并显示数据对象,如MyProject.Models.Class `XAML <Picker ItemsSource="{Binding City}" x:Name="selectCity" />` `C#` `List<AddInfo> addInfo = new List<AddInfo>` ` { new Class{City ="West Amman" }, new Class{

我不能装订。 并显示数据对象,如MyProject.Models.Class

`XAML
<Picker ItemsSource="{Binding City}" x:Name="selectCity" />`
`C#`
`List<AddInfo> addInfo = new List<AddInfo>`
      `  {
            new Class{City ="West Amman" },
            new Class{City ="East Amman" },
            new Class{City ="Ajloun" }
        };`  
`MyProject.Model.Class`    
`public class Class{
public string City { get; set; }
}` 
`Output` 
`MyProject.Model.Class
MyProject.Model.Class
MyProject.Model.Class`
XAML


@OmarMohammad try Now如果您告诉我如何从类Better访问文本从新类{City===>Ajloun获取值您需要在Xaml中使用ItemDisplayBinding={Binding Name},我如何在ListView中使用它您的问题解决了吗?
<Picker x:Name="picker" Title="Select Country" ItemDisplayBinding="{Binding Name}" >
</Picker>
public partial class SamplePage: ContentPage
{
    public ObservableCollection<Country> CountryList { get; set; } = new ObservableCollection<Country>
    {
        new Country{Name = "India" },
        new Country{Name = "Australia" },
        new Country{Name = "UAE" },
        new Country{Name = "USA" },
    };

    public SamplePage()
    {
        InitializeComponent();
        picker.ItemsSource = CountryList;
    }
}
public class Country
{
    public string Name { get; set; }
}