- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试更改 listview 上的 ViewCell,但下面的代码对我不起作用:
<DataTemplate>
<ViewCell Height="100">
<StackLayout Orientation="Horizontal">
<Image Source="{Binding Seller.Thumbnail}}" Aspect="AspectFit" />
<StackLayout Orientation="Vertical" >
<Label Text="{Binding CouponName}" FontAttributes="Bold" FontSize="12" />
<Label Text="{Binding EndOffer}" FontSize="11" />
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
最佳答案
ListView.RowHeight
属性ListView本身ViewCell.Height
然后将 ListView.HasUnevenRows
设置为 true
(但它会对性能产生一些影响)关于c# - 如何更改 ViewCell 中的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30696403/
更新:只是提醒一下,如果有人可以告诉我如何在不使用手势的情况下实现此功能,则有 500 分奖励> 我正在使用 ViewCell 和手势识别器使用以下代码打开选择器。 ViewCell 在左侧有一个标签
我的 xaml 页面上有以下带有绑定(bind)的 listView。我正在从我的 viewModel 将数据绑定(bind)到它。但是这些值没有绑定(bind)到单元格。
我有这个 XAML 代码: Card Selection
我对 JavaFX 非常陌生,想要创建一个自定义 listView,每个 ViewCell 包含 3 个标签和 2 个图像,并且我已在 fxml 文件中定义了它。为了简单起见,我在下面发布了一个仅使用
我希望我的 ListViews ViewCell 中的列都具有相同的大小。它目前设置为自动,最宽的名称应该获胜,所有其他列应该设置为最宽的标签宽度。目前它们每一行的宽度都不同。 ListView It
我已经在谷歌上搜索了一段时间,但没有找到解决方案。 我正在使用一个 nib 文件,它定义了一个我在多个 TableView 上重复使用的 View 单元格。 我的目标是针对不同的手机尺寸采用不同的 V
我建立了一个List<>项目对象的数量,这些对象被用作 ItemsSource到 ListView .在我的 ListView 上 ItemSelected事件,我试图更改该特定项目的元素之一。原始值
我正在尝试更改 listview 上的 ViewCell,但下面的代码对我不起作用:
您好,我使用 Xamarin Forms ListView,我想知道我是否可以基于特定绑定(bind)或在后面的代码中禁用上下文操作。 我为整个应用程序使用一个 GroupedListView,但它会
我在 Xamarin Forms XAML 中有一个 ListView,在这个 ListView 中,我想绘制一个带有 4 个标签和 1 个条目的网格。我的问题是,当我尝试显示 ListView 时,
如何使用 ViewCell 中的 Tapped 操作导航到其他页面? Xmal代码
tl;dr:如何在 Xamarin Forms 中像 iOS 邮件应用一样使用滑动来显示按钮 我正在尝试为类似于 iOS 邮件应用程序或此 https://components.xamarin.com
我有一个带有自定义 ViewCell 的 Xamarin.Forms ListView,其中包含一个带有条目和标签的 StackLayout。我希望在任何时候选择 ViewCell 时条目都能获得焦点
在this question on Xamarin Forums ,Craig Dunn 教授如何创建带框架的单元格。 我想在每个单元格之间添加一个空格。 目前单元格似乎粘在一起,ViewCell 没
我得到了一个带有内部角色系统的应用程序。根据当前角色,用户可以看到更多设置。对于每个设置,我都有一个 ViewCell。因此,就我而言,我想在开始时隐藏特殊设置,并在用户有权这样做时显示它们。 不幸的
我有一个带有按钮的自定义 ViewCell。当我单击此按钮时,我想在显示带有 ViewCell 的 ListView 的 ContentPage 中处理此单击。在 iOS 中,我会使用来自 Cell
我正在使用 ViewCell 在我的表格设置页面中创建行。我有一个设置可以选择浅色或深色主题。
我需要为 ListView View 单元左右滑动手势编写代码(或 XAML)。 向左滑动时,从 ListView (或可观察集合)列表中删除记录并更新 ListView 中剩余的列表项。向右滑动时,
我希望能够更改自定义 ViewCell 上的绑定(bind)属性,并更新 ListView 项 - 但它似乎仅用于初始化 View 并且变化没有反射(reflect)出来。请告诉我我缺少什么! 在这里
我正在 Xamarin.Forms 项目中处理 Accordion ListView。这意味着您可以单击 ListView 中的类别标题,这将展开或折叠其下方的子项。 每个类别标题中有两个图像和一个标
我是一名优秀的程序员,十分优秀!