Skip to content

[BUG] Using IconTintColorBehavior in a Grid in a DataTemplate for a CollectionView results in incorrect size for icon #1681

@StevilKnevil

Description

@StevilKnevil

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

If you have a collection view and then layout each row of the collection such that it has an ImageButton that has the IconTintColorBehavior applied, then the size of the button is not correctly calculated, meaning it's not rendered correctly in the grid

image

Expected Behavior

The layout should instead be the same as if no tint was applied:

image

Steps To Reproduce

  1. Open and build the repository
  2. Run and see how the red tinted icon is the incorrect size

Link to public reproduction project repository

https://github.com/StevilKnevil/IconTintColorBehavior

Environment

- .NET MAUI CommunityToolkit: 7.0.1
- OS: Windows 10
- .NET MAUI: 8.03

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/behaviorsIssue/Discussion/PR that has to do with BehaviorsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions