我的应用程序的主页正在检查用户信息。根据某些条件,弹出窗口显示导航到具有with视图的页面。我使用标准方法导航到它:
await Shell.Current.Navigation.PushAsync(new BindCardPage(user.uid), false);
但是当我第一次启动一个应用程序时,在尝试导航到一个网页视图页面后,NRE被抛出:
System.NullReferenceException: Object reference not set to an instance of an object.
at Xamarin.Forms.ShellSection.OnPushA
我有一个关于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
我使用的是Xamarin表单,在列表视图中单击元素后,我不会显示它的细节。它将打开一个新的视图与细节。我不知道如何将整个对象绑定到视图,以便轻松地使用他的属性。
这是我的代码:
public partial class ContactDetailPage : ContentPage
{
public ContactDetailPage(Agency agencyItem)
{
InitializeComponent();
// The agencyItem is