Skip to content

Conversation

@Kamalesh-Periyasamy
Copy link
Contributor

@Kamalesh-Periyasamy Kamalesh-Periyasamy commented Jul 23, 2025

Root Cause of the Issue

The issue was in the MeasureContent method where the width calculation for text wrapping didn't consider the available width constraint. When no explicit WidthRequest was set, the method used the button's natural text width (which would be very wide for long text) instead of the available layout width, preventing text wrapping.

Description of Change

Modified CalculateWidth method to use available width constraint if the measured width higher than width constraint.

Issues Fixed

Fixes #190

Screenshots

Before:

image image

After:

image image

@Kamalesh-Periyasamy Kamalesh-Periyasamy changed the title Fixed the Button WordWrap not function issue Resolved the button text does not wrap without explicit Widthrequest Jul 23, 2025
Copy link

@Choza-rajan Choza-rajan left a comment

Choose a reason for hiding this comment

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

The changes are fine

@PaulAndersonS
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PaulAndersonS PaulAndersonS added this to the v1.0.6 milestone Jul 27, 2025
@PaulAndersonS PaulAndersonS merged commit fa29e20 into syncfusion:main Jul 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

SfButton Does Not Wrap Text or Resize Vertically Without WidthRequest

3 participants