[UWP] IsVerticalScrollChainingEnabled无法正常工作:( [英] [UWP]IsVerticalScrollChainingEnabled not working :(

查看:69
本文介绍了[UWP] IsVerticalScrollChainingEnabled无法正常工作:(的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在UWP应用程序中嵌套了滚动查看器,问题是当子滚动查看器中没有更多内容时,滚动事件不会传递给父项。


< p style ="padding-right:0px; line-height:inherit; font-family:Arial,'Helvetica Neue',Helvetica,sans-serif; font-size:15px; vertical-align:baseline; clear:both; color :#242729">
期望:当用户将光标移动到子滚动查看器内并使用鼠标的垂直滚轮开始滚动时,子项中的内容应向下滚动直到结束,之后父滚动查看器应开始滚动。  <代码样式="margin:0px; padding:1px 5px; border:0px; font-style:inherit; font-variant:inherit; font-weight:inherit; line-height:inherit; font-family:Consolas,Menlo,Monaco,' Lucida Console','Liberation Mono','DejaVu Sans Mono', 'Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;字体大小:13像素;垂直对齐:基线;背景色:#eff0f1; white-space:pre-wrap"> IsVerticalScrollChainingEnabled  是
没有帮助。



这是我的代码:

< ScrollViewer Margin =" 0" Background =" Aqua"> ; 
< RelativePanel Height =" 1500" Background =" Red" Horizo​​ntalAlignment =" Center">
< ScrollViewer Name =" ScrollViewerImages"
Height =" 400" ; Width =" 600"
Background =" Blue" Margin =" 0,500,0,0"
VerticalScrollBarVisibility =" Hidden"
IsVerticalScrollChainingEnabled =" True">
< Image Source =" Assets\21_02_2018_121_008.jpg" Width =" 1200" />
< / ScrollViewer>
< / RelativePanel>
< / ScrollViewer>





解决方案


嗨Sadiq S Khoja



问题与IsVerticalScrollChainingEnabled属性无关。无法滚动子滚动查看器的原因是滚动查看器中没有内容
。此外,内容需要大于大小您可以进行测试,只需在滚动查看器中放置一个小图像。您可以看到滚动查看器不可滚动。如果您需要滚动滚动查看器,
您需要将一些内容放入滚动查看器中。 scrollviewer。





最好的问候,



罗伊


I have nested scrollviewers in UWP app, the problem is scroll event is not passed to the parent when there's no more content in child scrollviewer.

Expectation: When user move the cursor inside child scrollviewer and start scrolling using mouse's vertical wheel, content in child should scroll down till the end and after that parent scrollviewer should start scrolling. IsVerticalScrollChainingEnabled is not helping either.

Here's my code:

<ScrollViewer Margin="0" Background="Aqua">
        <RelativePanel Height="1500" Background="Red" HorizontalAlignment="Center">
            <ScrollViewer Name="ScrollViewerImages"
                          Height="400" Width="600"                       
                          Background="Blue" Margin="0,500,0,0"                               
                          VerticalScrollBarVisibility="Hidden"
                          IsVerticalScrollChainingEnabled="True">
            <Image Source="Assets\21_02_2018_121_008.jpg" Width="1200"  />
        </ScrollViewer>
    </RelativePanel>
</ScrollViewer>


解决方案

Hi Sadiq S Khoja

The problem is not related to the IsVerticalScrollChainingEnabled property. The reason for the child scrollviewer could not be scrolled is that there is no content in the scrollviewer. Also, the content needs to be larger than the size of scrollviewer. You could made a test, just put a small image in the scrollviewer. You could see the scrollviewer is not scrollable. If you need to the scrollviewer could be scrolled, you need to put some content in to the scrollviewer.

Best regards,

Roy


这篇关于[UWP] IsVerticalScrollChainingEnabled无法正常工作:(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆