Hello,
Because you have set the BindingContext="{Binding Close_Page_Clicked}"
for your button and
you have set the IsVisible="{Binding IsVisible}"
in your BindableButton.xaml
.
If you need to make the BindableButton to disappear, you need to change it in your ViewModel.
For example, You can set the false in the CollectionPageModel.cs
's constructor.
ButtonModel buttonModel= new ButtonModel("Close App", CloseAppAction, false); ;
Close_App_Clicked = buttonModel;
If you change it at runtime, set the buttonModel.IsVisible = true;
in your background code.
Xamarin support will end on May 1, 2024, it's recommended that you migrate your Xamarin app to .NET MAUI. Please see Xamarin official support policy .
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.