- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
XAML 中的 GridView 和 ListView 似乎是同一个控件。
开发者如何在两者之间做出选择?
最佳答案
GridView 控件通常水平滚动。此外,您将看到项目之间的一些原生间距大于 ListView 中的间距。之所以存在这种间距,是因为旨在考虑如何在 Windows 应用商店应用程序中使用这些控件。 (继续阅读)
<GridView>
<x:String>Item 1</x:String>
<x:String>Item 2</x:String>
</GridView>
<ListView>
<x:String>Item 1</x:String>
<x:String>Item 2</x:String>
</ListView>
MSDN: The ListView and GridView controls are both used to display collections of data in your app. They have similar functionality, but display data differently. They are both derived from the ItemsControl class. When we talk about an ItemsControl, the info applies to both the ListView and GridView controls.
The ListView displays data stacked vertically. It's often used to show an ordered list of items, such as a list of emails or search results. It's also useful in master-detail scenarios, where the list items contain only a small amount of info and the details of the selected item are shown separately.
The GridView displays data stacked horizontally. It's often used when you need to show a rich visualization of each item that takes more space, such as a photo gallery.*
关于windows-8 - 在 WinRT 中选择 XAML 的 ListView 和 GridView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10903669/
是否可以在 WinRT 中实现自定义转换?例如。如果能够实现控件可见性的转换,那就太好了。因此,当您显示/隐藏分割 View 的一部分时,它会使用滑动效果为整个 View 添加动画效果。 最佳答案 是
我正在开发基于 XAML C# 的通用应用程序(目前专注于 WP8.1) 我的应用程序的主页非常复杂,有 3 个枢轴,每个枢轴都有网格、图像、边框、按钮、 ListView 等 问题有时是当我在执行其
我不久前从 C++/CX 切换到 C++/winrt,目前我被卡住了,因为我想创建一个单例 winrt 类。我阅读了有关 winrt::static_lifetime ( https://learn.
与 C++/CX 不同,C++/WinRT 中似乎没有 GUID 的包装器类型。它只使用普通的 C GUID struct原样。因此构造初始化 GUID 的唯一方法是使用 aggregate init
文档显示了这个 C# 片段: async void DisplayDeleteFileDialog(){ ContentDialog deleteFileDialog = new Conten
文档显示了这个 C# 片段: async void DisplayDeleteFileDialog(){ ContentDialog deleteFileDialog = new Conten
这是 xaml 的样子:
我有一个文本框,我不希望用户粘贴到其中。 如何防止粘贴? 从另一个应用程序中将文本拖放到 TextBox 中也是一个粘贴事件吗? 最佳答案 从 Windows 8.1 开始,Windows.UI.XA
这实际上更像是一个好奇心类型的问题。我负责跨程序集和原始 IL 查找类型。不过,Windows 8 确实让我正在实现的某些事情陷入困境。我发现 WinRT 和非 WinRT 框架程序集共享相同的完全限
我正在尝试创建一个条目页面,其中一个选项是选择一个项目。该列表可以超过 1000 个,并且显示列出项目的启用搜索的页面是有意义的。当用户从编辑/创建屏幕中单击“选择项目”时,我可以将导航参数传递到该屏
我正在将我的库移植到 WinRT,它依赖于 System.Globalization.Calendar 类及其派生类,如 GregorianCalendar 和 HijriCalendar 等。虽然这
我需要下载一个大的视频文件并将其保存到硬盘上。 然后我需要使用 XAML 媒体元素播放这个视频文件。 但该文件必须使用 AES 256 算法和加密 key 进行加密。任何时候都不得将未加密的数据写入硬
假设我有这样的事情: 像这样: public class MyViewModel : INotifyPropertyChanged { public MyViewModel() {
我正在尝试使用 WinRT 中的当前文化来格式化日期时间值。但是CurrentCulture 属性似乎并不尊重系统文化。 我尝试了以下两个属性, System.Globalization.Cultur
我的应用程序是在 silverlight 中开发的。计划在今年晚些时候推出。我担心我的 xaps 会被逆向工程。我的 wcf 服务确实有很多智能,但您不能将所有内容都放在服务中。现在 winrt 是另
我使用下面的代码发送电子邮件。但是当我在 VS 的模拟器中运行它时,无法启动电子邮件客户端。我做错了什么?但是电子邮件客户端以本地计算机模式启动。 var mailto = new Uri("mail
我正在开发通用应用程序。在为Windows Phone 8.1项目设计 View 时,不能使任何按钮的宽度小于109。如果将按钮的width属性设置为小于该宽度,则呈现时它将变为109。 我想知道如何
情况: 我从不同的互联网位置获取 json 对象。 这些包含我放在 BingMap 上的许多地理坐标。效果非常好。 问题: 但是当我从互联网位置获取数据时,我得到了一个阻塞的用户界面。有没有办法在后台
想法是这样的,您正在 Visual Studio 2013 Update 2 中为 Windows 8.1-Update 和 Windows Phone 8.1 创建一个 WinRT-XAML 通用应
什么是更新(替换)本地存储中的图像的好方法,该图像绑定(bind)到导航堆栈中的图像控件。 更具体地说:我在页面 A (ViewProfile.xaml) 中显示图像,图像源绑定(bind)到属性 I
我是一名优秀的程序员,十分优秀!