Skip to content

Label with LineBreakMode="TailTruncation" does not render text if initial Text is null or empty on first render (iOS) #34591

@tibuprophen

Description

@tibuprophen

Description

When a Label is initialized with LineBreakMode="TailTruncation" and its Text is null or empty during the first render, later updates to the Text property do not render any visible text. The label remains visually empty even though the Text value changes successfully.

This behavior appears specific to the case where the label starts with no text. The issue does not occur when:

  • LineBreakMode is removed, or
  • An initial placeholder value such as a space (Text=" ") is set.

This causes problems in real-world scenarios where UI content is loaded asynchronously. A common pattern is to display a page with empty-bound labels while data loads in the background. Once data arrives and bindings update, labels using TailTruncation fail to display the updated text.

The issue has been reproduced on the current .NET MAUI version on iOS.


Expected Behavior

After tapping the button, the label should display the text "Test".

Actual Behavior

The label remains empty and does not render the updated text.

Impact

This affects common MVVM and async-loading scenarios where labels are initially empty and populated after data loading. It forces developers to use placeholder text or avoid truncation behavior, which is not ideal.

Device/Simulator

  • iPhone 12 Pro with iOS 26.2
  • iPhone 16e Simulator with iOS 26.3

Steps to Reproduce

  1. Create a new .NET MAUI project.
  2. Add the following XAML:
<?xml version="1.0" encoding="utf-8"?>

<ContentPage
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    x:Class="MauiApp1LabelBug.MainPage"
    x:Name="Page">

    <StackLayout BindingContext="{x:Reference Page}">
        <Label x:Name="Label" LineBreakMode="TailTruncation" />
        <Button Text="Test" Clicked="Button_OnClicked" />
    </StackLayout>

</ContentPage>
  1. Add the following code-behind:
namespace MauiApp1LabelBug;

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        InitializeComponent();
    }

    private void Button_OnClicked(object? sender, EventArgs e)
    {
        Label.Text = "Test";
    }
}
  1. Run the app on iOS.
  2. Tap the Test button.

Link to public reproduction project repository

No response

Version with bug

10.0.50

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 26.2/26.3

Did you find any workaround?

The issue does not occur if either of the following is done:

Remove LineBreakMode:

<Label x:Name="Label" />

Set an initial placeholder text

<Label x:Name="Label"
       LineBreakMode="TailTruncation"
       Text=" " />

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-labelLabel, Spani/regressionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/iosregressed-in-9.0.80s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions