我试图进入Xamarin开发,并遵循Microsofts视频教程
目前,我想用一些基本标签填充我的ListView。因此,首先,下面的代码对我来说很好。我创建了一个自定义ViewCell,并将它分配给ListView作为ItemTemplate
public class MasterPage : ContentPage
{
public ListView MasterPageNavigationItemsView { get; }
public MasterPage()
{
// ...
MasterPageNavigationIt
我正在和Xamarin一起工作,还是个新手,但我有一个问题,我觉得我不应该这样做。这就是我的问题:
using System;
using Xamarin.Forms;
namespace DataBinding_Lists
{
public class App
{
public static Page GetMainPage ()
{
var listView = new ListView { RowHeight = 40 };
listView.ItemsSource = new Person []
{
我有一个关于Xamarin.Forms中列表视图的问题,我成功地将列表视图与一些项目绑定在一起,但我想更改选定单元格的背景颜色,我该如何在Xamarin.Forms中做到这一点
我利用的是
var cell = DataTemplate(typeof(ImageCell));
ListView listView = new ListView
{
SeparatorColor = Color.Green,
ItemsSource = ListlvData,
ItemTemplate = cell, // Set the ImageCell to the item tem
我有一个ListView,它位于ContentPage上,我希望ListView的ItemTemplate是用户可定义的,即在运行时为模板解析XAML。但是,我需要给用户一个选项,让一个按钮调用页面上的命令。见下文XAML;
<SwipeView>
<SwipeView.RightItems>
<SwipeItems>
<SwipeItem
Text = ""Delete""
Back