Skip to content

BackButtonBehavior not bound #33139

@michele-guion

Description

@michele-guion

Description

I have a ContentPage, in which I define BackButtonBehavior as follows:

<Shell.BackButtonBehavior>
    <BackButtonBehavior Command="{Binding BackCommand}">
        <BackButtonBehavior.IconOverride>
            <FontImageSource Glyph="{x:Static enums:IconFont.Close}"
                             FontFamily="MaterialDesignIcons"/>
        </BackButtonBehavior.IconOverride>
    </BackButtonBehavior>
</Shell.BackButtonBehavior>

Since .NET9, the icon override stopped working and that's a known bug #32050.
I switched to .NET10 and also the command stopped working.


### Steps to Reproduce

_No response_

### Link to public reproduction project repository

_No response_

### Version with bug

10.0.11

### Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

### Last version that worked well

9.0.120 SR12

### Affected platforms

Android

### Affected platform versions

_No response_

### Did you find any workaround?

This is a binding error, for which I use this workaround in the page constructor:

Shell.SetBackButtonBehavior(this, new BackButtonBehavior
{
Command = viewModel.BackCommand
});

Relevant log output

Metadata

Metadata

Assignees

Labels

area-controls-shellShell Navigation, Routes, Tabs, Flyouts/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions