Windows phone 7如何在网格列表框中显示两列 [英] Windows phone 7 How to show two column in grid Listbox
问题描述
你好,
我的要求:
我想在两列的网格列表框中显示。
第一列字段应为员工照片(图片),姓名,年龄
和第二列应为相同字段。
假设从数据库中提取30行。我希望在两栏中显示15-15条记录
。怎么可能?是否有任何财产或其他任何东西......
<前lang =HTML>
第一列|第二栏
--------------- | --------------
姓名,年龄|姓名,年龄
照片img |照片img
--------------- | --------------
姓名,年龄|姓名,年龄
照片img |照片img
--------------- | --------------
在此先感谢:)
Br,
Siddhesh
我已经完成了自己。
下载以下设置&已安装:
1)Silverlight for Windows Phone Toolkit.msi
2)添加Referance:Microsoft.Phone.Controls.Toolkit
3)添加像源代码中的Page1.XAML文件
xmlns:toolkit =clr-namespace:Microsoft.Phone.Controls; assembly = Microsoft.Phone.Controls.Toolkit
)添加内部列表框控件:
< ListBox.ItemsPanel >
< ItemsPanelTemplate >
< toolkit:WrapPanel Orientation = 水平 < span class =code-attribute> FlowDirection = LeftToRight ItemWidth = 210 ItemHeight = 110 / >
< / ItemsPanelTemplate < span class =code-keyword>>
< / ListBox.ItemsPanel >
5)您的图片将显示如下:
1 2
3 4
5 6
7 8
Br,
Siddhesh
Hello,
My Requirement:
I want to show in grid-List box with Two column.
First column field should be employee photo(image),Name,Age
and second column should be same field.
Suppose there are 30 rows fetch from database. I want show 15-15 records
in both column. How it possible? is there any property or anything else...
First Column | Second Column
---------------|--------------
Name,Age | Name,Age
Photo img | Photo img
---------------|--------------
Name,Age | Name,Age
Photo img | Photo img
---------------|--------------
Thanks in Advance :)
Br,
Siddhesh
Hi,
I have done myself.
Download below setup & Installed:
1) Silverlight for Windows Phone Toolkit.msi
2) Add Referance: Microsoft.Phone.Controls.Toolkit
3) Add like "Page1.XAML" file in source code
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
4) Add Inside Listbox control:
<ListBox.ItemsPanel> <ItemsPanelTemplate> <toolkit:WrapPanel Orientation="Horizontal" FlowDirection="LeftToRight" ItemWidth="210" ItemHeight="110"/> </ItemsPanelTemplate> </ListBox.ItemsPanel>
5)your Image will display like:
1 2
3 4
5 6
7 8
Br,
Siddhesh
这篇关于Windows phone 7如何在网格列表框中显示两列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!