cost 66 ms
如何訪問 ItemsPanelTemplate 中的 ItemsWrapGrid 面板?

[英]How to access the ItemsWrapGrid panel which is placed inside the ItemsPanelTemplate?

我使用ItemsControl綁定到 ItemsSource 集合,並使用ItemsWrapGrid控制面板排列項目。 但是 ItemsWrapGrid 面板被放置在 ItemsPanelTemplate 內,所以我無法在 c# 后面的代碼中訪問該元素。 我嘗試使用VisualTreeHelper ...

如何解決 ItemsPanelTemplate 中 Grid.Row / Column 的錯誤?

[英]How to defeat a bug with Grid.Row / Column in ItemsPanelTemplate?

創建了一個簡單的附加屬性來簡化元素模板的綁定。 而不是這個: 你可以這樣 go : 這是附加屬性的完整代碼: 該物業並不復雜。 使用 Canvas,同樣可以正常工作。 對於網格,在使用元素附加集合或將第一個元素添加到集合時會出現問題 - 元素顯示在網格中而不考慮其 position。 雖然在可視化 ...

如何在水平StackPanel內的ListView中顯示組?

[英]How to display groups in a ListView inside a horizontal StackPanel?

我有一個ListView用於顯示具有一個分組級別的項目,但是我沒有設法在水平StackPanel中顯示組,我設置了ListView的模板,其ItemsPanel屬性,其ItemTemplate屬性和GroupStyle屬性但它不會顯示如下圖所示。 我已經閱讀了這篇文章 ,但我不明白如何在我 ...

在itempaneltemplate上的自定義用戶控件綁定

[英]custom user control binding on itemspaneltemplate

我在將用戶控件上的自定義依賴項屬性綁定到我的MVVM ViewModel時遇到麻煩。 當我直接在視圖上使用它時,我的用戶控件可以正常工作: 但是將其用作itemspaneltemplate綁定無效: 我嘗試過使用RelativeSource並找到itemscontrol / v ...

wpf listview itempanel scrollviewer

[英]wpf listview itempanel scrollviewer

當我在WrapPanel設置ListView.ItemsPanel ,右滾動條將丟失(不可見)。 並且內容通過鼠標滾輪滾動,當然,通過研究此滾動查看器中的可視樹,所有屬性都已正確安裝。 這里可能有什么不對,為什么他不可見。 這是截圖: ...

ListView如何在Codebehind而非Xaml中更改ItemsPanel

[英]ListView how to change ItemsPanel in codebehind instead than in xaml

我在我的xaml中格式化了listView。 那行得通,但我必須添加一個模式復雜的邏輯,以便必須應用 所以現在我需要在后面的代碼中應用上面的代碼。 ---編輯馬蒂諾·博丁(Martino Bordin) 請告訴我我誤會了什么: 1a。 我在列表視圖中定義了一種樣式: ...

如何在WPF的ListBox中的不同行/列中放置CheckBox?

[英]How to place CheckBoxes in different rows/columns within a ListBox in WPF?

在我的WPF桌面應用程序中,我有一個要顯示的列表框,其中包含兩行兩列(即2x2網格),並且在四個行/列中的每個位置都有一個復選框-我的XAML代碼在下面。 請注意,我不想進行任何數據綁定。 下面的代碼有效,但是顯示的是所有四個CheckBox都彼此重疊,即使我已指定它們應該位於不同的行/列中 ...

如何對不同的ItemsPanelTemplate使用不同的ItemsControl.ItemContainerStyle

[英]How to use different ItemsControl.ItemContainerStyle for different ItemsPanelTemplate

我有一個ItemsControl,它根據特定條件使用不同的ItemsPanelTemplate。 我希望每個ItemsPanelTemplate具有不同的ItemContainerStyle(實際上,我只希望其中一個模板具有ItemsContainerStyle)。 我該如何實現? 這是我 ...

使用ItemsPanelTemplate時的DisplayMemberPath

[英]DisplayMemberPath when using ItemsPanelTemplate

我有一個定義為SomeObject類型的對象的列表: 我想在一個列表框中顯示這些對象,該列表框為每個對象顯示一個圖像並將它們排列在圖塊布局中。 ItemsTemplate只是一個圖像。 ItemsPanelTemplate是TilePanel。 當我僅使用字符串(圖像路徑)作為 ...

需要自定義ListBox模板的建議

[英]Need advice on customizing ListBox template

我有一個CheckBox值的ListBox,值的數量會不時變化,可以是10、15、100等。 我想自定義值的顯示方式。 當前,如果我有50個值,它們都垂直顯示,只有一列。 我希望這樣,一列最多可以有10個值,並且我可以水平滾動以查看其他列的值。 我嘗試將StackPanel方 ...

在Windows Phone上設置ListView的GroupStyle.Panel

[英]Setting the GroupStyle.Panel of a ListView on Windows Phone

我正在嘗試使用分組創建一個ListView ,其中每個組中的元素都是水平顯示的(作為可滾動內容)。 無論我嘗試使用ListView的GroupStyle.Panel ,它似乎對列表沒有任何影響。 以下是我的XAML的外觀: 哪里 下圖顯示了我得到的實際結果,右邊顯示了我想 ...

數據綁定到具有最后一個元素的不同行為的集合

[英]Data binding to a collection with different behavior for the last element

這似乎是一個常見的問題,但我的Google-Fu讓我空洞無息。 如果以前曾被問過一千次,我會道歉! 我有一個集合,比如ObservableCollection<Athlete> 。 我想在屏幕上顯示該集合,使其看起來像: [澤西島照片] | [澤西島照片] | [ ...

動態更改WPF ListView ItemsPanel&ItemsContainerStyle

[英]Dynamically changing WPF ListView ItemsPanel & ItemsContainerStyle

我在XAML中有一個ListView,它以GridView(帶有列)的方式顯示其源集合。 但是我打算使用相同的ListView來顯示源集合,這些源集合可能位於圖像網格或某些卡片視圖中。 我希望ListView根據ComboBox選擇進行更改。 因此,對於ComboBox,值1 ListVi ...

如何顯示以下格式的分組項目(GridView組):一張大圖片,其余小圖片(附加示例)

[英]how to show grouped items (GridView group) with a format of: one big picture and the rest are small (example attached)

我希望GridView中的每個小組都將使用此特定的結構/模板(一個大項目,其余的大小相同): 這些項目應填滿屏幕,直到臀部不再有空間。 它應從右到左填充(當一列項目被填充時,我們將填充下一列)。 我的視圖模型公開了分組的集合,我希望GridView接受每個“小”項目並將其定位,就好像大 ...

在ComboBox的ItemsPanel上方添加其他控件

[英]Adding additional controls above a ComboBox's ItemsPanel

我想制作一個可搜索的ComboBox ,當擴展ComboBox下拉列表時,搜索框是一個顯示在ItemsPanel上方的TextBox 。 我想我需要制作一個自定義控件來實現搜索功能,但首先我只是嘗試使用普通的ComboBox來顯示TextBox 。 這是我當前的嘗試,當我嘗試擴展下拉列表時產 ...

如何自定義列表框的ItemsPanelTemplate的布局?

[英]How do I customize the layout of a ListBox's ItemsPanelTemplate?

我想為ListBox指定多個列,但是我的谷歌搜索技能使我在這一列上失敗了。 如何修改ListBox的ItemsPanelTemplate以自定義顯示的列? 編輯:忘了把我已經嘗試過的 我試過了代碼 除了我失去了垂直滾動條之外,哪個有效 ...

WPF ItemsControl.ItemsPanelTemplate作為網格並在不同的列中添加新項目

[英]Wpf ItemsControl.ItemsPanelTemplate as a Grid and add new items in different columns

我正在動態創建的網格中工作,在每個新列中都包含一個添加到ItemsControl的新項目。 我正在使用Rachel Lim的GridHelper 現在,我有一個如下的主窗口, XAML代碼: <Window x:Class="WpfApplication1.MainWi ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM