-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Picker not working on macOS #21691
Copy link
Copy link
Closed as not planned
Labels
area-controls-pickerPickerPickerplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystpotential-regressionThis issue described a possible regression on a currently supported version., verification pendingThis issue described a possible regression on a currently supported version., verification pendings/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Description
Description
The Picker control seems to be broken on macOS.
On macOS, clicking on the Picker displays a dialog that shows the title and a "Done" button but doesn't display the items:
Here's a video that shows it in action:
ReproduceMauiPickerIssue.mov
I'm running it on the latest 8.0 GA SDK:
andrewstellman@Andrews-MBP reproduce-maui-picker-issue % dotnet workload list
Installed Workload Id Manifest Version Installation Source
--------------------------------------------------------------------
maui 8.0.7/8.0.100 SDK 8.0.200
Use `dotnet workload search` to find additional workloads to install.
andrewstellman@Andrews-MBP reproduce-maui-picker-issue % dotnet build -t:Run -f net8.0-maccatalyst
Welcome to .NET 8.0!
---------------------
SDK Version: 8.0.203
This same code works fine on Windows and Android:
Steps to Reproduce
Here's some simple code to reproduce the issue:
XAML
<Picker x:Name="BirdPicker" Title="Pick a bird" />
<Button x:Name="AddBird" Text="Add a bird"
Margin="0,0,0,20" SemanticProperties.Hint="Adds a bird"
Clicked="AddBird_Clicked"/>
<Label x:Name="Birds"
Padding="10" MinimumWidthRequest="150"
TextColor="White" BackgroundColor="DarkBlue"
SemanticProperties.Description="Shows the added birds" />C#
public MainPage()
{
InitializeComponent();
BirdPicker.ItemsSource = new List<string> {
"Duck",
"Pigeon",
"Penguin",
"Ostrich",
"Owl"
};
}
private void AddBird_Clicked(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(Birds.Text))
{
Birds.Text = Birds.Text + Environment.NewLine;
}
Birds.Text += BirdPicker.SelectedItem;
}Link to public reproduction project repository
https://github.com/andrewstellman/reproduce-maui-picker-issue/
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-controls-pickerPickerPickerplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystpotential-regressionThis issue described a possible regression on a currently supported version., verification pendingThis issue described a possible regression on a currently supported version., verification pendings/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working

