Skip to content

[2025/04/21] Candidate - In Flight Branch #29037

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

Merged
merged 15 commits into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
39caefa
[Windows] - Fix Visual State Issue with Picker TextColor After Naviga…
prakashKannanSf3972 Apr 8, 2025
bf27f69
[iOS] Fixed the TargetInvocationException Occurs When Selecting Heade…
Ahamed-Ali Apr 11, 2025
12d2d5e
[iOS] - Resolved Proper Rendering of Dynamic Header/Footer Updates in…
prakashKannanSf3972 Apr 11, 2025
0987b16
[Android] Fixed ScalingCanvas.SetBlur not working (#28911)
NirmalKumarYuvaraj Apr 11, 2025
a009f76
[Windows] Upgrade to Windows App SDK 1.7 (#28499)
MartyIX Apr 11, 2025
9e2cbac
[iOS] Fix FlyoutPage does not respond to changes in the FlyoutLayoutB…
devanathan-vaithiyanathan Apr 11, 2025
0a240f9
[Android] Fixed the Incorrect Text Color Applied to Selected Tab in T…
Ahamed-Ali Apr 11, 2025
624223c
[iOS] Fix for the File.ContentType from MediaPicker not being in vali…
SyedAbdulAzeemSF4852 Apr 11, 2025
57f7f4d
[XC] add IRootObjectProvider (#28310)
StephaneDelcroix Apr 11, 2025
dfeadeb
[Android] picker - focus/unfocus events (#28122)
kubaflo Apr 16, 2025
9576008
[Windows] Fixed the flyout content width not being set correctly afte…
Tamilarasan-Paranthaman Apr 16, 2025
1fb5164
Revert "[Android] picker - focus/unfocus events (#28122)"
PureWeen Apr 16, 2025
16cd5f2
Fixed Test case failure in PR 29037 - [2025/04/21] Candidate (#29049)
HarishKumarSF4517 Apr 21, 2025
76baabc
Fix CarouselView layout SR6 regressions (#29035)
albyrock87 Apr 22, 2025
b1c026c
[Testing] Feature Matrix UITest Cases for CollectionView EmptyView Fe…
NafeelaNazhir Apr 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Windows] - Fix Visual State Issue with Picker TextColor After Naviga…
…tion (#28746)

* Fixed-VS-Picker

* Added-iOS-SnapShot
  • Loading branch information
prakashKannanSf3972 authored and PureWeen committed Apr 16, 2025
commit 39caefadb55c6f6c1189de137880d8e35897f2c6
99 changes: 99 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue28536.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
namespace Maui.Controls.Sample.Issues;

[Issue(IssueTracker.Github, 28536, "Navigation breaks VisualState styles for Picker", PlatformAffected.UWP)]
public class Issue28536NavigationPage : TestNavigationPage
{
protected override void Init()
{
Issue28536 page = new Issue28536();
Navigation.PushAsync(page);
}

class Issue28536 : TestContentPage
{
protected override void Init()
{
Style visualStatePickerStyle = new Style(typeof(Picker))
{
Setters =
{
new Setter { Property = Picker.TextColorProperty, Value = Colors.Green },
new Setter
{
Property = VisualStateManager.VisualStateGroupsProperty,
Value = new VisualStateGroupList
{
new VisualStateGroup
{
Name = "CommonStates",
States =
{
new VisualState { Name = "Normal" },
new VisualState
{
Name = "Disabled",
Setters =
{
new Setter { Property = Picker.TextColorProperty, Value = Colors.Red },
}
}
}
}
}
}
}
};

Switch enabledSwitch = new Switch
{
VerticalOptions = LayoutOptions.Center,
WidthRequest = 20,
Margin = 0,
HorizontalOptions = LayoutOptions.Start,
AutomationId = "Switch"
};

Picker picker = new Picker
{
HorizontalOptions = LayoutOptions.Center,
FontSize = 24,
Style = visualStatePickerStyle,
ItemsSource = new[]
{
"Baboon", "Capuchin Monkey", "Blue Monkey", "Squirrel Monkey",
"Golden Lion Tamarind", "Howler Monkey", "Japanese Macaque"
},
SelectedIndex = 1,
AutomationId = "VisualStatePicker"
};

picker.SetBinding(Picker.IsEnabledProperty, new Binding("IsToggled", source: enabledSwitch));

Button navigateButton = new Button
{
Text = "Go to Next Page",
HorizontalOptions = LayoutOptions.Center,
AutomationId = "NavigateButton"
};

navigateButton.Clicked += (_, _) => Navigation.PushAsync(new Issue28536SecondPage());

Content = new VerticalStackLayout
{
Padding = new Thickness(30, 0),
Spacing = 25,
Children = { enabledSwitch, picker, navigateButton }
};
}
}

class Issue28536SecondPage : TestContentPage
{
protected override void Init()
{
Content = new Label { Text = "Next Page" };
}
}
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues;
public class Issue28536 : _IssuesUITest
{
const string Switch = "Switch";
public override string Issue => "Navigation breaks VisualState styles for Picker";

public Issue28536(TestDevice device)
: base(device)
{ }

[Test]
[Category(UITestCategories.Picker)]
public void CheckNavigationBreaksVisualStatesForPicker()
{
App.WaitForElement("VisualStatePicker");
App.Tap(Switch);
App.Tap("NavigateButton");
App.WaitForElement("Next Page");
App.TapBackArrow();
App.WaitForElement(Switch).Tap();
VerifyScreenshot();
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/Core/src/Platform/Windows/PickerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public static void UpdateTextColor(this ComboBox nativeComboBox, IPicker picker)
nativeComboBox.Resources.SetValueForAllKey(TextColorResourceKeys, platformBrush);
nativeComboBox.Foreground = platformBrush;
}

nativeComboBox.RefreshThemeResources();
}

// ResourceKeys controlling the foreground color of the ComboBox.
Expand Down