问题描述
我有一个问题,应用程序启动后垂直滚动条没有出现。 我将 ListPrinterButton 填充在后面的代码中,并设置propertyChanged事件。所有按钮在ItemsControl中都是可见的,但只有在通过移动网格拆分器调整该区域的大小之后,才会出现垂直滚动条。
是否有“刷新” ScrollViewer的选项?我什至尝试将VerticalScrollBarVisibility设置为Visible,但是,滚动条是可见的,但不可编辑。只有移动网格拆分器或调整表单大小才会出现滚动的正确机会。
可以帮忙吗?
<ScrollViewer Grid.Row="0" x:Name="svDeviceButton" VerticalScrollBarVisibility="Auto" PanningMode="Both" Background="Transparent">
<Grid>
<ItemsControl ItemsSource="{Binding ListPrinterButton,UpdateSourceTrigger=PropertyChanged}" x:Name="icPrinter">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True" Orientation="Horizontal">
</WrapPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Grid>
</ScrollViewer>
<GridSplitter Grid.Row="1" Height="5" HorizontalAlignment="Stretch" x:Name="gsDeviceButton"/>
非常感谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)