Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Listview 在Xamarin forms代码隐藏中使用2个值为visible属性设置绑定_Listview_Xamarin.forms_Multibinding - Fatal编程技术网

Listview 在Xamarin forms代码隐藏中使用2个值为visible属性设置绑定

Listview 在Xamarin forms代码隐藏中使用2个值为visible属性设置绑定,listview,xamarin.forms,multibinding,Listview,Xamarin.forms,Multibinding,我有一个包含标签的列表。列表视图在XAML文件中声明,其中列表的数据单元在cs文件中以编程方式生成。我需要基于这两个字段值绑定列表中此标签的visible属性 Xaml代码: <ListView x:Name="lvItemSigns" HasUnevenRows="True" SeparatorVisibility="Default" SeparatorColor="Gray"> 我可以使用1个值绑定visible属性,如何使用2个值来完成?在模型上创建只读属性 public b

我有一个包含标签的列表。列表视图在XAML文件中声明,其中列表的数据单元在cs文件中以编程方式生成。我需要基于这两个字段值绑定列表中此标签的visible属性

Xaml代码:

<ListView x:Name="lvItemSigns" HasUnevenRows="True" SeparatorVisibility="Default" SeparatorColor="Gray">

我可以使用1个值绑定visible属性,如何使用2个值来完成?

在模型上创建只读属性

public bool Visible 
{
  get
  {
    // test for multiple conditions here
    return PropertyA && PropertyB;
  }
}

每当设置任何依赖属性的值时,您还需要引发PropertyChangedVisible。

这是否正确?私人布尔(u deleteimiticovisible);;public bool DeleteItemIconVisible{get{return RecordID==0&&SyncError;}set{{u DeleteItemIconVisible=value;OnPropertyChangedDeleteItemIconVisible;}}@Jasonyou不需要集合,也没有理由使用私有变量,因为get从未使用过它
public bool Visible 
{
  get
  {
    // test for multiple conditions here
    return PropertyA && PropertyB;
  }
}