ScrollViewer.IsHorizontalRailEnabled=“假"或 ScrollViewer.IsHorizontalRailEnabled=“True"没有效果 [英] ScrollViewer.IsHorizontalRailEnabled="False" or ScrollViewer.IsHorizontalRailEnabled="True" has no effect
本文介绍了ScrollViewer.IsHorizontalRailEnabled=“假"或 ScrollViewer.IsHorizontalRailEnabled=“True"没有效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在学习 xaml,我在 Gridview.我注意到当我输入时:
I am learning xaml and I am at Gridview. I have noticed that when I type in:
<GridView x:Name="Grid1" Grid.Row="1" SelectionMode="None" Padding="120,0,0,0" RenderTransformOrigin="0.5,0.5" d:LayoutRounding="Auto"
ScrollViewer.IsHorizontalRailEnabled="False">
或
<GridView x:Name="Grid1" Grid.Row="1" SelectionMode="None" Padding="120,0,0,0" RenderTransformOrigin="0.5,0.5" d:LayoutRounding="Auto"
ScrollViewer.IsHorizontalRailEnabled="True">
运行应用程序时没有区别.我想知道ScrollViewer.IsHorizontalRailEnabled"是否真的做了什么,或者我做错了什么.ScrollViewer.IsVerticalRailEnabled"也一样
There is no difference when I run the app. I would like to know if "ScrollViewer.IsHorizontalRailEnabled" really does anything, or am I doing something wrong. Also same for "ScrollViewer.IsVerticalRailEnabled"
我去过 MSDN,那里的解释没有帮助.谢谢.
I have been to MSDN, the explanation there doesn't help. Thanks.
推荐答案
要启用水平滚动,需要这样做
<GridView x:Name="Grid1" Grid.Row="1" SelectionMode="None" Padding="120,0,0,0" RenderTransformOrigin="0.5,0.5" d:LayoutRounding="Auto">
<ScrollViewer HorizontalScrollBarVisibility="Auto" HorizontalScrollMode="Enabled">
<!-- Inside XAML code here -->
</ScrollViewer>
</GridView>
要启用垂直滚动,您需要这样做
<GridView x:Name="Grid1" Grid.Row="1" SelectionMode="None" Padding="120,0,0,0" RenderTransformOrigin="0.5,0.5" d:LayoutRounding="Auto">
<ScrollViewer VerticalScrollBarVisibility="Auto" VerticalScrollMode="Enabled">
<!-- Inside XAML code here -->
</ScrollViewer>
</GridView>
希望这会有所帮助!
这篇关于ScrollViewer.IsHorizontalRailEnabled=“假"或 ScrollViewer.IsHorizontalRailEnabled=“True"没有效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文