Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[ANDROID] ToolbarItem IsEnabled doesnt read initial binding, and doesnt behave like it should  #5386

Open
@bentmar

Description

@bentmar

Description

ToolbarItems in a NavigationPage ignores the default value for a binding to the IsEnabled property.
On versions Before 4.X you have to force-set the default value on the UI-thread.
On versions 3.5.X and up it totally ignores the IsEnabled property.

Steps to Reproduce

  1. Start The app
  2. The default value for the IsEnabled binding is false
  3. You can see that the initial behaviour is that the toolbarItem actually is enabled.
  4. Uncomment the "MakeItWork" method and now it works.

Expected Behavior

If enabled is false either by changing the binding or reading the bindings initial value, the behaviour of the toolbaritem should be false too.

Actual Behavior

Initial value is not respected. Forcing the value to false (again) only works if you do it on UI thread.
On the later versions of XF IsEnabled is ignored.

Basic Information

On 4.X and 3.5.X changing isEnabled is totally ignored.

  • Last known good version: 3.4.X (here the behaviour actullay changes, but fails
    to set initial value/behavior)

  • IDE:
    Microsoft Visual Studio Enterprise 2017
    Version 15.9.7
    VisualStudio.15.Release/15.9.7+28307.423
    Microsoft .NET Framework
    Version 4.7.03190
    Installed Version: Enterprise
    Mono Debugging for Visual Studio 4.13.12-pre (9bc9548)
    Support for debugging Mono processes with Visual Studio.
    Xamarin 4.12.3.80 (d15-9@914127c74)
    Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
    Xamarin.Android SDK 9.1.7.0 (HEAD/ba9da7a76)
    Xamarin.Android Reference Assemblies and MSBuild support.

  • Platform Target Frameworks:

    • Android: testes on 8.1 and 9.0

Reproduction Link

App2.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions