C# ScrollViewer在最上面和最下面的位置有一条横线
我有一个ScrollViewer,它在包装中包含一组项目。xaml树如下所示:C# ScrollViewer在最上面和最下面的位置有一条横线,c#,xaml,scrollviewer,wrappanel,C#,Xaml,Scrollviewer,Wrappanel,我有一个ScrollViewer,它在包装中包含一组项目。xaml树如下所示: <Grid> <ScrollViewer> <ItemsControl ItemsSource="{Binding xyz}" Tag="{Binding .}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPa
<Grid>
<ScrollViewer>
<ItemsControl ItemsSource="{Binding xyz}" Tag="{Binding .}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True" Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Button.... styling etc.>
当滚动到最顶部或最底部位置时,控件上会出现一条白线-图片如下:
这是在使用VisualStates的视图中发生的。还有其他使用ScrollViewer的可视状态,但此问题不会发生。关于这个特定的视觉状态,唯一的独特之处是使用ItemsPanel/WrapPanel。我试着删除它只是为了找出问题的原因,即使我认为问题仍然存在
当滚动条到达第一个/最后一个索引时,它几乎无法完全刷新/绘制
以前有人见过这样的东西吗
有趣的是,如果我在debug中运行我的应用程序,滚动条显示得非常好。只有在启动发布版本时,问题才会出现