Skip to content

IsEnabled does not work in BackButtonBehavior #28722

@acaliaro

Description

@acaliaro

Description

If I use this code

<Shell.BackButtonBehavior>
<BackButtonBehavior
Command="{Binding NavBarBackButtonCommand}"
IsEnabled="{Binding IsBackButtonEnabled}"
IsVisible="{Binding HasBackButton}" />

</Shell.BackButtonBehavior>

and set IsBackButtonEnabled to false in the VM, the back button does not disable. IsVisible, on the other hand, works correctly

@kubaflo you have already worked to solve BackButtonBehavior problems; can you take a look to this, thanks!

Steps to Reproduce

Run the sample. press the button should open a new page where is present the back button

Link to public reproduction project repository

https://github.com/acaliaro/MauiIsEnabledDoesNotWorkInBackButtonBehavior

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

ios 18.2.1, android 13.0

Did you find any workaround?

no

Relevant log output

Metadata

Metadata

Assignees

Labels

area-controls-shellShell Navigation, Routes, Tabs, Flyoutplatform/androidplatform/ioss/needs-attentionIssue has more information and needs another looks/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions