我有一個ListBox。它有內部的ScrollViewer,所以我可以用鼠標滾輪滾動ListBox內容。它工作正常,直到我設置包含另一個ListBox的項目模板(實際上,我有4個嵌套的ListBoxes =))。問題在於內部ListBox的ScrollViewer竊取了輪迴事件。有沒有簡單的方法來防止這種行爲?如何禁用ListBox中的ScrollViewer?
我曾與ItemContainerStyle ListBox的是這樣的:
<Style x:Key="ListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="BorderBrush" Value="Black"/>
...
</Style>
<ListBox ItemContainerStyle="{StaticResource ListBoxItemStyle}" />
如何設置樣式在這樣的資源ItemContainer的項目邊界?正如我所知ContentPresenter是ItemsControl的項目容器。但它沒有邊界,所以我無法設計它。
_Does真的有意義有一個選定的項目中選定的項目,所選項目內_是。如何從列表中的列表中選擇一個項目? – wotanii 2016-09-23 07:49:26
這也從列表框中刪除了很多其他的東西,例如, drop-events – wotanii 2016-09-23 07:55:56