Skip to content

[Windows] Fix for ArgumentException thrown when setting a negative padding value for the label #29163

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 5 commits into from
May 16, 2025
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Added a comment line explaining the assignment of zero when a padding…
… value is negative
  • Loading branch information
SyedAbdulAzeemSF4852 committed Apr 23, 2025
commit 1ab2b87a67c70172736fef9b297f73a63a9e2c8d
1 change: 1 addition & 0 deletions src/Core/src/Platform/Windows/TextBlockExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static void UpdateTextColor(this TextBlock platformControl, ITextStyle te

public static void UpdatePadding(this TextBlock platformControl, ILabel label)
{
// Label padding values do not support negative values; if specified, negative values will be replaced with zero
var padding = new WThickness(
Math.Max(0, label.Padding.Left),
Math.Max(0, label.Padding.Top),
Expand Down
Loading