![](/img/trans.png)
[英]WPF- How can i use a List that i declare and fill in my MainWindow in a Usercontrol?
[英]WPF- List View. How can I enable my content to display Vertically and Horizontally?
在這方面,我真的很感激一些幫助。 所以我的主頁上有一個列表視圖,目前所有內容都是垂直顯示的。 一個在另一個下面。 內容由圖標、標題和說明組成。 此內容在運行時動態加載。 我希望內容以不同的方式顯示,以便我將其顯示為
內容內容
內容內容
內容內容
內容內容
我無法從列表視圖中更改,因此將不勝感激任何幫助。 我已經能夠水平顯示內容,但不能水平和垂直顯示。
使用具有兩列的 UniformGrid:
<ItemsControl ItemsSource="{Binding YourCollection}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="2"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.