dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.24k stars 1.76k forks source link

Picker control does not respect size imposed by parent. #7243

Open philipag opened 2 years ago

philipag commented 2 years ago

Description

The Picker control does not limit its size to the limits specified by its parent. It should never become larger than the size allotted to it, but it does if the selected item text does not fit into the allotted size. In XF this did not happen so this appears to be a regression.

When the selected item text does not fit into the allotted size, then ellipses or truncation should be used to prevent increasing the control size. Under some circumstances, Android does proper sizing of the Picker and truncates the text, but I could not make that work in the repro either.

Additionally, using the middle "*" column has an even stranger effect of apparently making the middle column width negative (the Pickers moves to the left). Also depending on the parent layout the Picker can overextend to the left or to the right.

Steps to Reproduce

  1. Build and run the repro sample under Android and iOS
  2. On both platforms the white Picker control extends beyond the bounds of the parents:

image layoutbug13.zip

Version with bug

Release Candidate 3 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

Android 11, iOS 15

Did you find any workaround?

no

Relevant log output

No response

VincentBu commented 2 years ago

repro on Android & IOS with VS main build[32516.383.main]

ghost commented 2 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

XamlTest commented 1 year ago

Verified this on Visual Studio Enterprise 17.6.0 Preview 6.0. Repro on Android emulator (13.0-API 33) and iOS 16.4 with below Project: 7243.zip

iOS: image

Android: image