diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue24520.xaml b/src/Controls/tests/TestCases.HostApp/Issues/Issue24520.xaml new file mode 100644 index 000000000000..f7ffa29b5d6e --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue24520.xaml @@ -0,0 +1,155 @@ + + + + + + \ No newline at end of file diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue24520.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue24520.xaml.cs new file mode 100644 index 000000000000..90c4045e15b7 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue24520.xaml.cs @@ -0,0 +1,10 @@ +namespace Maui.Controls.Sample.Issues; + +[Issue(IssueTracker.Github, 24520, "Change the LineStackingStrategy to BlockLineHeight for Labels on Windows", PlatformAffected.UWP)] +public partial class Issue24520 : ContentPage +{ + public Issue24520() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyLineHeightRendering.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyLineHeightRendering.png new file mode 100644 index 000000000000..2ba4f02f34d0 Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyLineHeightRendering.png differ diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24520.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24520.cs new file mode 100644 index 000000000000..e3daac8461ee --- /dev/null +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24520.cs @@ -0,0 +1,23 @@ +#if TEST_FAILS_ON_ANDROID // https://github.com/dotnet/maui/issues/24504 +using NUnit.Framework; +using UITest.Appium; +using UITest.Core; + +namespace Microsoft.Maui.TestCases.Tests.Issues; + +public class Issue24520 : _IssuesUITest +{ + public Issue24520(TestDevice testDevice) : base(testDevice) + { + } + + public override string Issue => "Change the LineStackingStrategy to BlockLineHeight for Labels on Windows"; + + [Test] + [Category(UITestCategories.Label)] + public void VerifyLineHeightRendering() + { + VerifyScreenshot(); + } +} +#endif \ No newline at end of file diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ReduceInvalidateMeasuresUpdatingLabel.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ReduceInvalidateMeasuresUpdatingLabel.png index cad3063bd41b..1feccb9ac302 100644 Binary files a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ReduceInvalidateMeasuresUpdatingLabel.png and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/ReduceInvalidateMeasuresUpdatingLabel.png differ diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithFormattedTextAndLineHeight.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithFormattedTextAndLineHeight.png index 63c63a96c334..9b454ba0edd4 100644 Binary files a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithFormattedTextAndLineHeight.png and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithFormattedTextAndLineHeight.png differ diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithTextTypeAndLineHeight.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithTextTypeAndLineHeight.png index dfc663dbd525..fbd2a3be0422 100644 Binary files a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithTextTypeAndLineHeight.png and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithTextTypeAndLineHeight.png differ diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithTextWhenLineHeight.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithTextWhenLineHeight.png index 5251fb252a46..e14794519a23 100644 Binary files a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithTextWhenLineHeight.png and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLabelWithTextWhenLineHeight.png differ diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLineHeightRendering.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLineHeightRendering.png new file mode 100644 index 000000000000..4fdc675daf9e Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyLineHeightRendering.png differ diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/WordWrapLineBreakModeNoExtraSpace.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/WordWrapLineBreakModeNoExtraSpace.png index 483bdc13320a..59e69969dbd8 100644 Binary files a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/WordWrapLineBreakModeNoExtraSpace.png and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/WordWrapLineBreakModeNoExtraSpace.png differ diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/VerifyLineHeightRendering.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/VerifyLineHeightRendering.png new file mode 100644 index 000000000000..77bcafa804c4 Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/VerifyLineHeightRendering.png differ diff --git a/src/Core/src/Platform/Windows/Styles/Resources.xaml b/src/Core/src/Platform/Windows/Styles/Resources.xaml index 107cefc7b80c..e087c0c9d707 100644 --- a/src/Core/src/Platform/Windows/Styles/Resources.xaml +++ b/src/Core/src/Platform/Windows/Styles/Resources.xaml @@ -20,4 +20,7 @@ +