Xamarin.Forms.InputKit
Xamarin.Forms.InputKit copied to clipboard
CheckChangedCommand event is not called in a BindableLayout, for dynamically created checkboxes. Xamarim Forms 3.6.0.293080.
trafficstars
Describe the bug CheckChangedCommand event is not called in a BindableLayout, for dynamically created checkboxes. Xamarim Forms 3.6.0.293080.
To Reproduce
<StackLayout BindableLayout.ItemsSource='{Binding Answers}' Spacing='0' Margin='0' Padding='0'>
<BindableLayout.ItemTemplate>
<DataTemplate>
<input:CheckBox x:Name='Teste' Text='{Binding Description}' Type='Box' CheckChangedCommand='{Binding CheckChangedCommand}' CommandParameter='{Binding Id}'/>
</DataTemplate>
</BindableLayout.ItemTemplate>
</StackLayout>
Expected behavior Call function:
CheckChangedCommand = new Command(CheckChanged);
private void CheckChanged(object answer)
{
var resp = _respostas.First(x => x.Id == answer);
App.Current.MainPage.DisplayAlert("Resposta", resp.Description,"OK");
}
Smartphone (please complete the following information):
- Device: Xiaomi MI 8 lite
- OS: Android 9
- Version MIUI Global 10.2
Additional context Create a dynamic checkbox list linked to the View Model. Following the MVVM standard.
Any progress on this issue?
I can't understand the issue, but You can use SelectionView to achieve the same goal with less pain
I abandoned all projects in Xamarin and the technology. I can't help with this issue anymore. Sorry.