I use Xamarin.Forms and MvvmCross, but I've encountered a problem in applications. Buttons become disabled sometimes after touched and running the commands.
I added IsEnabled="True" to button but nothing changed
<Button
WidthRequest="36"
HeightRequest="36"
CornerRadius="18"
BorderWidth="2"
FontSize="18"
Text="{Binding OptionText}"
Command="{Binding OptionSelectedCommand}"
CommandParameter="{Binding .}"
IsEnabled="True"
VerticalOptions="Center"
HorizontalOptions="Center"/>
I want this button to be enabled always.
My Command code is:
new MvxAsyncCommand(async () =>
{
if (option.IsSelected)
{
option.IsSelected = false;
}
else
{
option.OptionGroup.Options.ForEach(c => c.IsSelected = false);
option.IsSelected = true;
}
return Task.CompletedTask;
})
OptionSelectedCommand
? – Undergarment