Skip to content

Conversation

@SyedAbdulAzeemSF4852
Copy link
Contributor

Issue Details

  • Argument Exception is thrown when a label's padding is set to a negative value.

Root Cause

  • Since .NET MAUI's Label uses WinUI's TextBlock on Windows, assigning negative padding values is not supported and will result in an exception.

Description

  • Instead of directly creating a WThickness object with the provided padding values, ensured none of the padding values are negative. If any value is negative, then assigned zero; otherwise, assigned the specified padding value.

Validated the behaviour in the following platforms

  • Windows
  • Android
  • iOS
  • Mac

Issues Fixed

Fixes #6387

Output

Before After

@dotnet-policy-service
Copy link
Contributor

Hey there @@SyedAbdulAzeemSF4852! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Apr 24, 2025
jsuarezruiz
jsuarezruiz previously approved these changes Apr 24, 2025
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 marked this pull request as ready for review April 24, 2025 07:13
@SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 requested a review from a team as a code owner April 24, 2025 07:13
@samhouts samhouts added the area-controls-label Label, Span label Apr 24, 2025
@PureWeen PureWeen changed the base branch from main to inflight/current May 16, 2025 19:31
@PureWeen PureWeen merged commit 15502b2 into dotnet:inflight/current May 16, 2025
1 check passed
PureWeen pushed a commit that referenced this pull request May 21, 2025
…dding value for the label (#29163)

* [Windows] Fix for 6387 ( Negative Padding values fail ).

* [Windows] Fix for 6387 ( Negative Padding values fail ).

* Have added Test case

* Added a comment line explaining the assignment of zero when a padding value is negative

* Have modified the test case
PureWeen pushed a commit that referenced this pull request May 21, 2025
…dding value for the label (#29163)

* [Windows] Fix for 6387 ( Negative Padding values fail ).

* [Windows] Fix for 6387 ( Negative Padding values fail ).

* Have added Test case

* Added a comment line explaining the assignment of zero when a padding value is negative

* Have modified the test case
github-actions bot pushed a commit that referenced this pull request May 22, 2025
…dding value for the label (#29163)

* [Windows] Fix for 6387 ( Negative Padding values fail ).

* [Windows] Fix for 6387 ( Negative Padding values fail ).

* Have added Test case

* Added a comment line explaining the assignment of zero when a padding value is negative

* Have modified the test case
github-actions bot pushed a commit that referenced this pull request May 30, 2025
…dding value for the label (#29163)

* [Windows] Fix for 6387 ( Negative Padding values fail ).

* [Windows] Fix for 6387 ( Negative Padding values fail ).

* Have added Test case

* Added a comment line explaining the assignment of zero when a padding value is negative

* Have modified the test case
github-actions bot pushed a commit that referenced this pull request May 30, 2025
…dding value for the label (#29163)

* [Windows] Fix for 6387 ( Negative Padding values fail ).

* [Windows] Fix for 6387 ( Negative Padding values fail ).

* Have added Test case

* Added a comment line explaining the assignment of zero when a padding value is negative

* Have modified the test case
@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-label Label, Span community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Negative Padding values fail

4 participants