The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hello, we are having trouble with binding a custom control inside of a SfListView.ItemTemplate to a property on the containing control. The binding seems correct as far as I can tell -- the name of the containing control is ThisControl, it has a property named ViewModel, which has an ICommand property ToggleItemCommand. The property is a custom BindableProperty, but it also seems correct.
The item shows with the correct Text value. Even though the binding is set, and everything "seems" correct, we do not see any value from the binding for the Command property. The Set is never called. I can only think that it is something about the list view that we are doing wrong. Could you please offer some help?
The hopefully relevant portions are shown below. Syncfusion.Xamarin.SfListView version is 17.2.0.47
SRSangeetha Raju Syncfusion Team September 6, 2019 02:13 PM UTC
Hi David,
We would like to let you know that ifyou apply binding to SfListView through ViewModel, you can access the ViewModel Command as like below mentioned code snippet. Since we don’t have complete xaml snippet of “ThisControl” reference we have done the binding using SfListView binding context to access ViewModel.
Can you please check with the above mentioned codes and please let us know if you require any further assistance.
Regards,
Sangeetha Raju.
DSDavid SaylorSeptember 6, 2019 05:42 PM UTC
Thanks, we will try that.
DSDavid SaylorSeptember 6, 2019 06:55 PM UTC
YES, this worked for us. Thank you!
SRSangeetha Raju Syncfusion Team September 9, 2019 06:03 AM UTC
Hi David,
We are glad for our solution works. Thanks for the update.
Please let us know if you require further queries or else you can close the incident.
Regards,
Sangeetha Raju.
DSDavid SaylorSeptember 9, 2019 01:16 PM UTC
I actually don't see where the option to close this incident is. Can you show me?
SRSangeetha Raju Syncfusion Team September 10, 2019 11:39 AM UTC
Hi David,
Sorry for our previous update. This is the open forum which can't be closed at your end. So, please ignore previous update and let us know if you have any further queries.
Regards,
Sangeetha Raju.
RYRowena YoungApril 4, 2021 01:59 PM UTC
Hi,
I have a sfbutton which is inside the multilevel sflistview.
I try to apply the same code, but encounter the following error:
Position 49:79. Can not find the object referenced by `x:Reference selectedChildBucketItems` when the app load on my phone.
Full code as below.
HorizontalOptions="CenterAndExpand" >
LNLakshmi Natarajan Syncfusion Team April 5, 2021 11:45 AM UTC
Hi Rowena,
Thank you for using Syncfusion support.
We have checked the reported query “Cannot find the object referenced by `x:Reference selectedChildBucketItems` when the app load on my phone” from our side. We would like to inform you that the selectedChildBucketItems is the name of the SfListView.
Please refer to the document regarding x:Reference in the following link,