C# 如何选择一个列表作为另一个列表的项目c

C# 如何选择一个列表作为另一个列表的项目c,c#,xaml,windows-phone-8,listpicker,C#,Xaml,Windows Phone 8,Listpicker,如何仅选择列表中的一个列表作为列表的一部分?一个FeatList项由CurrencyTypes和Date组成。我只需要将日期等于ListCtrl3.SelectedItem的CurrencyTypes列表添加到卷发列表中 namespace PhoneApp1 { public class CurrencyOfDate { public List<CurrencyType> CurrencyTypes; public string Date {

如何仅选择列表中的一个列表作为列表的一部分?一个FeatList项由CurrencyTypes和Date组成。我只需要将日期等于ListCtrl3.SelectedItem的CurrencyTypes列表添加到卷发列表中

    namespace PhoneApp1
{
    public class CurrencyOfDate
    {
    public List<CurrencyType> CurrencyTypes;
    public string Date { get; set; }
    public override string ToString()
    {
        return Date;
    }
}
public class CurrencyType
{
    public string Name { get; set; }
    public string Value { get; set; }

    public override string ToString()
    {
        return Name;
    }
}
public partial class MainPage : PhoneApplicationPage
{
    List<CurrencyType> curList = new List<CurrencyType>();
    public event PropertyChangedEventHandler PropertyChanged;

    public void InvokePropertyChanged(string propertyName)
    {
        PropertyChangedEventHandler handler = PropertyChanged;
        if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
    }

    public List<CurrencyType> CurList
    {
        get { return curList; }
        set
        {
            curList = value;
            InvokePropertyChanged("CurList");
        }
    }
    List<CurrencyOfDate> featList = new List<CurrencyOfDate>();
    public List<CurrencyOfDate> FeatList
    {
        get { return featList; }
        set
        {
            featList = value;
            InvokePropertyChanged("FeatList");
        }
    }
    // Constructor
    public MainPage()
    {
        InitializeComponent();

        Dispatcher.BeginInvoke(() =>
        {
            _download_serialized_data("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml");
        });
    }
    private async void _download_serialized_data(string url)
    {
        HttpClient webclient = new HttpClient();

        try
        {
            var downloadedString =
                await
                    webclient.GetStringAsync(
                        new Uri("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml"));
            XElement xmlData = XElement.Parse(downloadedString);
            XNamespace ns = "http://www.ecb.int/vocabulary/2002-08-01/eurofxref";

            List<CurrencyOfDate> list = new List<CurrencyOfDate>();
            foreach (XElement c in xmlData.Elements(ns + "Cube").Elements(ns + "Cube"))
                list.Add(new CurrencyOfDate()
                {
                    Date = c.Attribute("time").Value,
                    CurrencyTypes =
                        (from k in xmlData.Elements(ns + "Cube").Elements(ns + "Cube").Elements(ns + "Cube")
                            select new CurrencyType()
                            {
                                Name = k.Attribute("currency").Value,
                                Value = k.Attribute("rate").Value
                            }).ToList()
                });
            FeatList = list;
            ListCtrl3.ItemsSource = FeatList;
            foreach (var selItem in list.Where(selItem => ListCtrl3.SelectedItem.ToString() == selItem.Date))
            {
                CurList = selItem.CurrencyTypes.ToList();
                FromList.ItemsSource = CurList;
                break;
            }
        }
和xaml:

     <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,511">
        <toolkit:ListPicker ScrollViewer.VerticalScrollBarVisibility="Auto"
                               ItemsSource="{Binding CurList}" 
                                x:Name="FromList"
                                Margin="10,0,240,0">
            <toolkit:ListPicker.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <TextBlock FontSize="30" 
                               Text="{Binding Name}">
                        </TextBlock>
                    </StackPanel>
                </DataTemplate>
            </toolkit:ListPicker.ItemTemplate>
        </toolkit:ListPicker>
    </Grid>
    <Grid>
        <toolkit:ListPicker x:Name="ListCtrl3" ItemsSource="{Binding FeatList}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalContentAlignment="Stretch" Margin="230,0,10,0">
            <toolkit:ListPicker.ItemTemplate>
                <DataTemplate>
                    <TextBlock TextWrapping="Wrap"  Text="{Binding Date}"/>
                </DataTemplate>
            </toolkit:ListPicker.ItemTemplate>
        </toolkit:ListPicker>
    </Grid>

你有什么问题?错误或错误是什么?我得到所有日期的所有CurrencyType,而不是只有一个日期等于ListCtrl3.SelectedItem