Skip to content

[BUG] TouchBehavior overrides BackgroundColor binding and prevents UI updates #3091

Closed

Description

@eduardoagr

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

When using TouchBehavior on a Border, the behavior overrides the BackgroundColor even when the property is bound to a dynamic value. This causes the UI to stop updating the color in real time.
The issue appears when using HoveredBackgroundColor, but also happens indirectly when using other hover properties (scale, rotation, etc.), because the behavior internally manipulates the visual state and blocks the bound color from refreshing.
This results in:

  • The bound color not updating while the pointer is over the control
  • The UI showing an incorrect color
  • The correct color only appearing after restarting the app
  • The binding not receiving updates until the hover state ends
    This makes Touch Behavior incompatible with dynamic color scenarios.

Expected Behavior

The BackgroundColor binding should continue to update normally, even when TouchBehavior is active.

Steps To Reproduce

  • Create a ContentView with a Border whose BackgroundColor is bound to a ViewModel property.
  • Add a TouchBehavior to the same Border.
  • Change the bound color at runtime (e.g., via a ColorPicker).
  • Observe that the UI does not update the color until the pointer leaves the control or the app restarts.

Link to public reproduction project repository

https://github.com/eduardoagr/TextileSystem

Environment

- .NET MAUI version: 10
- CommunityToolkit.Maui version: 14
- Platform: Windows / Android / iOS

Anything else?

No response

Activity

  1. breyed commented on Feb 13, 2026

    @breyed

    Additionally, AppThemeObject<T>.GetBinding throws an exception when called by CommunityToolkit 14.0.0 with Microsoft.Maui.Controls 10.0.40. Works with Microsoft.Maui.Controls 10.0.31.

     Method Microsoft.Maui.Controls.AppThemeBinding..ctor()' is inaccessible from method CommunityToolkit.Maui.AppThemeObject`1[Microsoft.Maui.Graphics.Color].GetBinding()'
       at CommunityToolkit.Maui.AppThemeObject`1[[Microsoft.Maui.Graphics.Color, Microsoft.Maui.Graphics, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].GetBinding()
    

    Repro:

    new AppThemeColor { Light = new Color(0, 0, 0, 1), Dark = new Color(1, 1, 1, 1) }.GetBinding()
  2. bijington commented on Feb 13, 2026

    @bijington
    Contributor

    Additionally, AppThemeObject<T>.GetBinding throws an exception when called by CommunityToolkit 14.0.0 with Microsoft.Maui.Controls 10.0.40. Works with Microsoft.Maui.Controls 10.0.31.

     Method Microsoft.Maui.Controls.AppThemeBinding..ctor()' is inaccessible from method CommunityToolkit.Maui.AppThemeObject`1[Microsoft.Maui.Graphics.Color].GetBinding()'
       at CommunityToolkit.Maui.AppThemeObject`1[[Microsoft.Maui.Graphics.Color, Microsoft.Maui.Graphics, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].GetBinding()
    

    Repro:

    new AppThemeColor { Light = new Color(0, 0, 0, 1), Dark = new Color(1, 1, 1, 1) }.GetBinding()

    Please raise a separate bug for that

  3. breyed commented on Feb 13, 2026

    @breyed

    Done. (I had placed my comment above on the wrong issue. It was supposed to go on #3089.)

  4. locked and limited conversation to collaborators on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions