1
如何在Windows Phone 8中爲應用程序顯示兩列的列表?在網格視圖中爲windows phone 8顯示一個列表
items.xaml.cs:
public async void Initi()
{
var itemsManagement = new ItemsManagement();
var itemList = await itemsManagement.GetAllItems();
var templist = from c in itemList.Data orderby c.Name, c.Id ascending select c;
NameList.ItemsSource = templist;
}
items.xaml:
<ListBox x:Name="NameList">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name}">
</TextBlock>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
該方案顯示在一列我的名單,我想在兩列
你有什麼試過的?請閱讀[this](http://mattgemmell.com/2008/12/08/what-have-you-tried/) – 2013-03-18 14:55:23
在您的DataTemplate中創建一個網格:http://msdn.microsoft.com/en-us /library/system.windows.controls.grid(v=vs.95).aspx – Fabrice 2013-03-18 15:24:55
如何避免重複數據? – user2169047 2013-03-18 19:12:08