-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Windows] Fixed Picker items width wont resize back #33042
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,35 @@ | ||||||
| namespace Maui.Controls.Sample.Issues; | ||||||
|
|
||||||
| [Issue(IssueTracker.Github, "32984", "Picker on resize not working on Windows", PlatformAffected.UWP)] | ||||||
| public class Issue32984 : ContentPage | ||||||
| { | ||||||
| public Issue32984() | ||||||
| { | ||||||
| VerticalStackLayout layout = new VerticalStackLayout | ||||||
| { | ||||||
| WidthRequest = 600 | ||||||
| }; | ||||||
|
|
||||||
| Picker issue32984Picker = new Picker | ||||||
| { | ||||||
| AutomationId= "issue32984Picker", | ||||||
| Title = "Select an item", | ||||||
| HorizontalOptions = LayoutOptions.Fill, | ||||||
| ItemsSource = new List<string> { "Item1", "Item2", "Item3"} | ||||||
| }; | ||||||
|
|
||||||
| Button button = new Button | ||||||
| { | ||||||
| AutomationId= "issue32984Button", | ||||||
|
||||||
| AutomationId= "issue32984Button", | |
| AutomationId = "issue32984Button", |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public class Issue32984 : _IssuesUITest | ||
| { | ||
| public Issue32984(TestDevice device) | ||
| : base(device) | ||
| { | ||
| } | ||
|
|
||
| public override string Issue => "Picker on resize not working on Windows"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.Picker)] | ||
| public void Issue32984PickerShouldResize() | ||
| { | ||
| App.WaitForElement("issue32984Button"); | ||
| App.Tap("issue32984Picker"); | ||
| #if ANDROID | ||
| App.WaitForElement("Cancel"); | ||
| App.Tap("Cancel"); | ||
| #elif IOS || MACCATALYST | ||
| App.WaitForElement("Done"); | ||
| App.Tap("Done"); | ||
| #elif WINDOWS | ||
| App.TapCoordinates(10, 10); | ||
| #endif | ||
SubhikshaSf4851 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| App.Tap("issue32984Button"); | ||
| App.Tap("issue32984Picker"); | ||
| VerifyScreenshot(); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -145,6 +145,12 @@ void OnMauiComboBoxDropDownClosed(object? sender, object e) | |||||
| if (VirtualView is null) | ||||||
| return; | ||||||
|
|
||||||
| if (sender is ComboBox comboBox && comboBox.MinWidth > 0) | ||||||
|
||||||
| if (sender is ComboBox comboBox && comboBox.MinWidth > 0) | |
| if (sender is ComboBox comboBox) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent spacing in property assignment. There's an extra space after the equals sign:
Should be:
This is consistent with the spacing used in line 23 for the Button's AutomationId.