如何在XAML中以水平方式(左和右)滚动ListView或GridView [英] How to make a ListView or GridView scroll horizntally (left and right) in XAML

查看:151
本文介绍了如何在XAML中以水平方式(左和右)滚动ListView或GridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。在互联网上挖掘后决定提出这个问题。

我正在创建UWP应用程序。目前我正在努力使ListView或GridView在Xaml中向左和向右滚动而不是向上和向下滚动。我认为这很容易因为它没什么不寻常的但是开始放弃了。实现此功能的最简单方法是什么?

提前谢谢

解决方案

MS在UWP中故意将滚动方向更改为垂直方向。如果需要水平滚动,则应使用控件模板定义自己的样式。采用默认样式: https://msdn.microsoft.com/en-us/library/ windows / apps / mt299128.aspx 并更改有关方向的所有内容


Hi guys. After a digging in the internet decided to ask that question.
I'm creating UWP app. Currently I'm struggling to make a ListView or a GridView to scroll to the left and right instead of up and down in Xaml. I thought that would be easy cause it's nothing unusual but started to give up. What is the easiest way to achieve this functionality?
Thanks in advance

解决方案

MS changed scrolling direction to vertical intentionally in UWP. If you need horizontal scrolling, you should define own style with control template. Take default style: https://msdn.microsoft.com/en-us/library/windows/apps/mt299128.aspx and change all things about orientation


这篇关于如何在XAML中以水平方式(左和右)滚动ListView或GridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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