1
A
回答
1
製作ListBox
水平滾動很簡單:
<ListBox Margin="20">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<!-- If you need Virtualization then check up on that topic accordingly and you'd need to switch the following StackPanel to a VirtualizingStackPanel -->
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBoxItem Content="Something A" />
<ListBoxItem Content="Something B" />
<ListBoxItem Content="Something C" />
<ListBoxItem Content="Something D" />
<ListBoxItem Content="Something E" />
<ListBoxItem Content="Something F" />
</ListBox>
對於自定義對象的一部分,試着去先通過與ListBox
控制工作的一些基本的例子說喜歡These。
你會則非常簡單,只是有你綁定到ListBox
自定義對象的集合通過它的ItemSource
,然後在XAML定義DataTemplate
的,這將有助於可視化的自定義對象。
差不多在^^聲明(Binding
,ItemSource
,DataTemplate
)你想了解第一,你可以只是在尋找,AINT新的東西找到大量的幫助,每個每易怒字。
相關問題
- 1. 如何製作水平滾動列表
- 2. 水平滾動的自定義視圖
- 3. UIScrollView的自定義水平滾動
- 4. 水平滾動表:多個固定列
- 5. 限制這個自定義導航的水平滾動
- 6. 使水平滾動自定義日曆
- 7. 水平滾動自定義網格
- 8. 製作一個固定的div水平滾動
- 9. 滾動列表頭水平
- 10. CSS水平列表滾動?
- 11. 水平滾動列表
- 12. 製作DataGridView水平滾動事件滾動另一個控件
- 13. 如何用自動寬度製作語義html水平定義列表?
- 14. 在自定義列表視圖中一次實現水平和垂直滾動
- 15. 自定義水平滾動條產生的溢出:自動
- 16. 滾動整個列表查看水平
- 17. 內部自定義視圖水平滾動視圖不滾動
- 18. 水平自定義列表框
- 19. DataGridView自動水平滾動列拖放
- 20. 如何製作表頭和第一列固定在滾動垂直和水平?
- 21. div水平滾動不工作自動
- 22. 水平滾動表
- 23. 自動滾動水平ListView
- 24. 自動水平滾動
- 25. 自動水平滾動
- 26. 水平滾動但具有固定的第一列的表格
- 27. (新)製作水平列表
- 28. 帶固定第一列的水平滾動表
- 29. 水平滾動時固定表格中的第一列
- 30. 水平滾動的HTML表格(第一列固定)
在大多數情況下,您應該使用'VirtualizingStackPanel'而不是'StackPanel'作爲'ItemPanelTemplate'的方向。 –
@SimonBelanger這就是UI中的要求。通過'ItemsPanelTemplate'實現'Orientation'的概念就是我想傳達的內容,而不是實際的控制。我會將它添加爲xaml中的註釋,儘管如此 – Viv
我同意。我意識到它可能聽起來像是這樣,但我並不反對你,只是增加了你的答案。 ;) –