question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement FormattedText in Controls

See original GitHub issue

Steps to Reproduce

    <VerticalStackLayout>
        <Label Text="Regular label:"/>
        <Label Text="Test1"/>
        <Label Text="FormattedText label:"/>
        <Label >
            <Label.FormattedText>
                <FormattedString>
                    <Span Text="Test2"></Span>
                </FormattedString>
            </Label.FormattedText>
        </Label>
    </VerticalStackLayout>

EDIT: The implementation of this is not quite finished - see https://github.com/dotnet/maui/pull/3637

Expected Behavior

Regular label: Test1 FormattedText label: Test2

Actual Behavior

image

Basic information

I have tested it on Android only (Pixel 4 API 30), and don’t know whether it reproduces on other platforms.

Repro project

MauiApp3.zip

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Axemastacommented, Dec 12, 2021

+1 seeing this issue with Win UI

0reactions
Redthcommented, Jan 19, 2022

Fixed by #3637

Read more comments on GitHub >

github_iconTop Results From Across the Web

FormattedText Class (System.Windows.Media)
Obsolete. Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, and brush.
Read more >
Drawing Formatted Text - WPF .NET Framework
The FormattedText object allows you to draw multi-line text, in which each character in the text can be individually formatted.
Read more >
Drawing Formatted Text in a Windows Forms Application ...
How it works. The FormattedText class takes a string of characters and allows you to format arbitrary character ranges in a very simple...
Read more >
How to Use Formatted Text Fields
How to Use Formatted Text Fields ... Formatted text fields provide a way for developers to specify the valid set of characters that...
Read more >
Programming Formatted Textparts - TX Text Control .NET for ...
All objects in a text part collection implement the IFormattedText interface. The collection can be obtained with the TextControl.TextParts, WPF.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found