【发布时间】:2011-07-19 16:15:54
【问题描述】:
我有一个 WPF .Net 4 应用程序,其中包含一个按钮,单击该按钮会打开一个新窗口:
CreationWindow creationWindow = new CreationWindow();
creationWindow.Owner = this;
CreationWindow.Show();
窗口显示正常,但它包含的列表框(例如 100 个图像作为内容的列表框项)在滚动条上没有拇指。
这里是这个“CreationWindow”的内容示例
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"~
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Converters="clr-namespace:Krocr.Client.Converters"
x:Class="Krocr.Client.ComparisonMode"
Title="ComparisonMode" Height="450" Width="700">
<Grid>
<ListBox ItemsSource="{Binding Images}"/>
</Grid>
</Window>
滚动条可见,但我无法与之交互。鼠标滚轮会滚动列表。
但是..
如果我在主窗口中添加一个滚动查看器,并向其中添加一些项目。随后的滚动查看器(在新窗口中)然后正常工作......
我根本没有为列表框或滚动查看器更改任何样式...非常困惑!
非常感谢您的帮助,因为这让我发疯了。
编辑:添加了问题的屏幕截图(由于我是新手,所以还不能发布图片......)
【问题讨论】: