-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Picker width on Windows not filling container #6391
Comments
Verified this issue with Visual Studio Enterprise 17.3.0 Preview 1.0 [32414.199.main]. Repro on Windows with above project. |
still an issue on windows with 17.3.0 Preview 2.0 [32507.29.main]. |
Still an issue on 6.0.300-rc.4.5760 |
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. |
To workaround this issue I have mapped the #if WINDOWS
...
PickerHandler.Mapper.Add(nameof(View.HorizontalOptions), MapHorizontalOptions);
...
private static void MapHorizontalOptions(IViewHandler handler, IView view)
{
if (view is not View mauiView)
{
return;
}
if (handler.PlatformView is not Microsoft.UI.Xaml.FrameworkElement element)
{
return;
}
element.HorizontalAlignment = mauiView.HorizontalOptions.Alignment switch
{
LayoutAlignment.Start => Microsoft.UI.Xaml.HorizontalAlignment.Left,
LayoutAlignment.Center => Microsoft.UI.Xaml.HorizontalAlignment.Center,
LayoutAlignment.End => Microsoft.UI.Xaml.HorizontalAlignment.Right,
LayoutAlignment.Fill => Microsoft.UI.Xaml.HorizontalAlignment.Stretch,
_ => throw new ArgumentOutOfRangeException()
};
}
#endif |
I hate this picker look on Windows... If you set a width, nice it's ok. Select an item, the width of the picker is updated to be the size of the selected item. If I set my Picker width to be 200, don't change it to 100 or 120 or 150 depends on the length of the selected item display string value... |
Currently experiencing this bug as well. |
Im still having this issue with 17.3.4. |
yeah, I still experience this issue as well.. Given it is in the backlog for more than half a year at this point it seems that doesn't change anytime soon. |
Also able to repro |
Same problem |
Still experiencing this issue. Thanks for the workaround @notanaverageman! |
+1 to upvote this issue in the priority list |
Description
When placing a Picker control inside a grid, it does not resize to fill the grid cell on Windows like it does on Android.
Steps to Reproduce
Maui Picker Width.zip
Place a picker control inside a grid -- added backgroundcolors and a margin to show relative sizes.
On Android, it shows the Picker fills the cell; on Windows it shows the Picker as a minimal size inside the larger(blue) cell.
Version with bug
Release Candidate 1 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows 10
Did you find any workaround?
setting width and height manually
Relevant log output
No response
The text was updated successfully, but these errors were encountered: