Skip to content

BitmapIcon sizing in AutoSuggestBox does not match UWP #5630

Closed

Description

@MartinZikmund

Current behavior

When AutoSuggestBox contains a BitmapIcon, it is not sized properly and stretches.

Expected behavior

Should match UWP.

How to reproduce it (as minimally and precisely as possible)

Check the AutoSuggestBox_BitmapIcon sample or the AutoSuggestBox_Icons sample. Notice the stretch applied to the icon differs from UWP.

From investigation it might be an issue with Grid measurement. On UWP for Measure the icon gets INFxINF, while in our case it get {Grid.ActualWidth}xINF. This forces the BitmapIcon to measure its stretched size instead of its actual bitmap size.

Apparently the issue is

Workaround

Environment

Nuget Package:

  • Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
  • Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
  • Uno.SourceGenerationTasks
  • Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
  • Other:

Nuget Package Version(s):

Affected platform(s):

All except for UWP.

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Skia
    • WPF
    • GTK (Linux)
    • Tizen
  • Windows
  • Build tasks
  • Solution Templates

IDE:

  • Visual Studio 2017 (version: )
  • Visual Studio 2019 (version: )
  • Visual Studio for Mac (version: )
  • Rider Windows (version: )
  • Rider macOS (version: )
  • Visual Studio Code (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

Activity

  1. added
    kind/bug
    triage/untriaged
    difficulty/tbd
    difficulty/medium 🤔
    project/layout 🧱
    and removed
    difficulty/tbd
    on Mar 31, 2021
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

    difficulty/medium 🤔kind/bugproject/layout 🧱triage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions