Uno: [WASM] ComboBoxItem doesn't stretch horizontally

Created on 12 Jun 2020  路  4Comments  路  Source: unoplatform/uno

Related GitHub Issue: https://github.com/unoplatform/Uno.Material/issues/12

Current behavior

ComboBoxItem doesn't stretch horizontally for WebAssembly.

WASM
image

UWP
image

Android
image

iOS
image

Expected behavior

ComboBoxItem should stretch horizontally by default like for the other platforms.

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

<ComboBox MinWidth="150"
          HorizontalAlignment="Left"
          PlaceholderText="TestPlaceholder">
            <ComboBoxItem Content="A"
                          Background="DeepPink" />
            <ComboBoxItem Content="B" />
            <ComboBoxItem Content="C" />
</ComboBox>

Environment

Nuget Package: Uno.UI

Package Version(s): 3.0.0-dev.476

Affected platform(s):

  • [ ] iOS
  • [ ] Android
  • [X] WebAssembly
  • [ ] WebAssembly renderers for Xamarin.Forms
  • [ ] macOS
  • [ ] Windows
  • [ ] Build tasks
  • [ ] Solution Templates

Visual Studio:

  • [ ] 2017 (version: )
  • [X] 2019 (version: 16.5.4)
  • [ ] for Mac (version: )
kinbug projecitems projeclayout

All 4 comments

@jeromelaban / @davidjohnoliver the issue seems to be at the ItemsPresenter/CarouselPanel level
image

ItemsPresenter
image

CarouselPanel
image

Other related ComboBox Issue : https://github.com/unoplatform/uno/issues/3358

@jeromelaban / @davidjohnoliver after some investigation in Uno, here is what I found.
CarouselPanel for WASM is using ItemsStackPanelLayout that is based on VirtualizingPanelLayout.

And for the VirtualizingPanelLayout, ShouldBreadthStretch is set to false because it's inside a popup in the case of the ComboBox.

Related to this previous PR(https://github.com/unoplatform/uno/pull/2745) in regards to this previous issue(https://github.com/unoplatform/uno/issues/2680).

If I change the ShouldBreadthStretch value to true, it fixes my current issue but I'm able to see the previous issue(https://github.com/unoplatform/uno/issues/2680).

I'm in the process of finding a solution that can accommodate both issues at the same time.
i.e. not having the width of the popup bigger than the ComboBox, but still having the ability to stretch the content inside the popup.

@davidjohnoliver / @jeromelaban
I'm not currently working on it anymore. Will come back to it when I have the time.
Feel free to grab the issue in the meantime.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MartinZikmund picture MartinZikmund  路  3Comments

jeromelaban picture jeromelaban  路  3Comments

TonyHenrique picture TonyHenrique  路  3Comments

JanabiSoft picture JanabiSoft  路  4Comments

MartinZikmund picture MartinZikmund  路  3Comments