Skip to content

[Net 11] Fix Windows Label Feature Matrix test failures - #37035

Merged
kubaflo merged 3 commits into
dotnet:net11.0from
devanathan-vaithiyanathan:Revert-windows-Label-Images
Aug 7, 2026
Merged

[Net 11] Fix Windows Label Feature Matrix test failures#37035
kubaflo merged 3 commits into
dotnet:net11.0from
devanathan-vaithiyanathan:Revert-windows-Label-Images

Conversation

@devanathan-vaithiyanathan

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Issue Details

n PR #35892, we modified the Windows Label feature matrix baseline image. Due to the image update, the tests failed. The image generated by the current CI matches the existing baseline image.

Description of Change

Added the ClearValue logic and updated the failed image test cases.

Note: Please do not merge the PR until the CI is complete.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37035

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37035"

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@devanathan-vaithiyanathan devanathan-vaithiyanathan added the community ✨ Community Contribution label Aug 3, 2026
@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Aug 3, 2026
@devanathan-vaithiyanathan devanathan-vaithiyanathan added do-not-merge Don't merge this PR partner/syncfusion Issues / PR's with Syncfusion collaboration and removed partner/syncfusion Issues / PR's with Syncfusion collaboration labels Aug 3, 2026
@vishnumenon2684

Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests , maui-pr-devicetests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@vishnumenon2684

Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests , maui-pr-devicetests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@devanathan-vaithiyanathan devanathan-vaithiyanathan changed the title [WIP][Net 11] Fix Windows Label Feature Matrix test failures [Net 11] Fix Windows Label Feature Matrix test failures Aug 6, 2026
@devanathan-vaithiyanathan
devanathan-vaithiyanathan marked this pull request as ready for review August 6, 2026 13:37
Copilot AI review requested due to automatic review settings August 6, 2026 13:37
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Windows TextBlock line-height mapping for Label so that resetting Label.LineHeight back to its default value clears the previously-applied platform LineHeight, preventing stale layout/screenshot behavior in subsequent updates (e.g., feature-matrix flows).

Changes:

  • Clear the Windows TextBlock.LineHeight dependency property when ILabel.LineHeight is reset (< 0 / default).
  • Add a Windows handler device test verifying the LineHeight local value is removed when Label.LineHeight is reset to default.

Reviewed changes

Copilot reviewed 2 out of 26 changed files in this pull request and generated 1 comment.

File Description
src/Core/src/Platform/Windows/TextBlockExtensions.cs Clears TextBlock.LineHeightProperty when ILabel.LineHeight is reset, ensuring the default platform value is restored.
src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.Windows.cs Adds a regression test validating LineHeight local value resets to DependencyProperty.UnsetValue.

Comment on lines 68 to +77
public static void UpdateLineHeight(this TextBlock platformControl, ILabel label)
{
if (label.LineHeight >= 0)
{
platformControl.LineHeight = label.LineHeight * platformControl.FontSize;
}
else
{
platformControl.ClearValue(TextBlock.LineHeightProperty);
}
@vishnumenon2684

Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests , maui-pr-devicetests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@kubaflo
kubaflo merged commit bd2330f into dotnet:net11.0 Aug 7, 2026
138 of 141 checks passed
@github-actions github-actions Bot added this to the .NET 11.0-preview7 milestone Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-label Label, Span community ✨ Community Contribution do-not-merge Don't merge this PR partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants