在Windows UWP項目中,我試圖綁定到以下屬性在這個類XAML綁定到子集合
using System;
using System.Collections.ObjectModel;
namespace IAmOkShared.Models
{
public class Client
{
public Guid clientId { get; set; }
public string lastname { get; set; }
public DateTime timestamp { get; set; }
//- List af addresses of this client
public ObservableCollection<Address> clientaddresses;
public Client()
{
clientId = Guid.Empty;
lastname = string.Empty;
timestamp = DateTime.Today;
clientaddresses = new ObservableCollection<Address>();
}
}
}
綁定到的clientId和姓氏是沒有問題的,但不能讓它正確的綁定到一個或多個clientaddresses的屬性(如城市,國家)
我的XAML:
不知道如何解決這個問題? 史蒂芬
結合clientaddresses [0]。市將總是結合第一元件集合中,做了你試圖結合等文本= 「{結合clientaddresses.city}」 –