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
- Create a new .NET MAUI project.
- 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>
- 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";
}
}
- Run the app on iOS.
- 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:
Set an initial placeholder text
<Label x:Name="Label"
LineBreakMode="TailTruncation"
Text=" " />
Relevant log output
Description
When a
Labelis initialized withLineBreakMode="TailTruncation"and itsTextisnullor empty during the first render, later updates to theTextproperty do not render any visible text. The label remains visually empty even though theTextvalue changes successfully.This behavior appears specific to the case where the label starts with no text. The issue does not occur when:
LineBreakModeis removed, orText=" ") 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
TailTruncationfail 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
Steps to Reproduce
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:
Set an initial placeholder text
Relevant log output