0
我有一個GridView綁定與完美的數據源。綁定FlipView與GridView
public void LoadXmlData(string dateOfRunAsString)
{
IEnumerable<RetrieveFromXml> processList = from process in xmlDocument.Descendants("Process")
where process.Parent.Parent.Attribute("Date").Value == dateOfRun
select new RetrieveFromXml(process.Attribute("Name").Value, Convert.ToDouble(process.Elements("ActiveTime").Sum(sec => (int)sec)));
NameGrid.ItemTemplateSelector = myTemplateSelector;
NameGrid.ItemsSource = processesList;
}
現在的問題是我需要結合GridView到flipView。
就像FlipView將顯示一個GridView的每一天。
像
for(int i = 0; i<10; i++)
{
flipview.list.add(processfromxml(date+i));
//Consider processfromxml() is returning a Ienumerable List
}
這樣的FlipView將顯示在GridView的第一天,就點擊旁邊會顯示在GridView的第二天。
請幫助如何在XAML實現這一點,C#在Windows 8
這是我的基礎類來獲取數據。
public class RetrieveProcessFromXml
{
private string name;
private double activeTime;
public RetrieveFromXml(string nameFromXml,double activeTimeFromxml)
{
name = nameFromXml;
activeTime = activeTimeFromxml;
}
public string Name
{
get { return name; }
set { name = value; }
}
public double ActiveTime
{
get { return activeTime; }
set { activeTime = value; }
}
enter code here
} //End Class