Skip to content
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

Html styling is not applying to Label on Windows #19519

Open
Ahmadpashaquarterpi opened this issue Dec 20, 2023 · 5 comments
Open

Html styling is not applying to Label on Windows #19519

Ahmadpashaquarterpi opened this issue Dec 20, 2023 · 5 comments
Labels
area-controls-label Label, Span platform/windows 🪟 t/bug Something isn't working
Milestone

Comments

@Ahmadpashaquarterpi
Copy link

Ahmadpashaquarterpi commented Dec 20, 2023

Description

I am trying to highlight text using html tags. Android platform showing expected behaviour, But on windows it is not applying styles.(Did not test on iOS or MacCatalyst)

<Label TextType="Html"> <![CDATA[ <p style='background:#ff0000;color:#ffffff'>Este es el primer párrafo con <b><u>texto subrayado</u></b> para demostrar la funcionalidad.</p> <p>Y este es el segundo párrafo, donde parte del <del>texto está tachado</del> para ilustrar otro estilo.</p> ]]> </Label>

It is showing as follows on windows:
image

Steps to Reproduce

1- Create a MAUI Project.
2- Add a label with TextType="Html" and add html code in text.

Link to public reproduction project repository

https://github.com/dotnet/maui/files/13735164/HTMLSample.zip

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@Ahmadpashaquarterpi Ahmadpashaquarterpi added the t/bug Something isn't working label Dec 20, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Dec 20, 2023
@PureWeen PureWeen added the s/needs-repro Attach a solution or code which reproduces the issue label Dec 20, 2023
@ghost
Copy link

ghost commented Dec 20, 2023

Hi @Ahmadpashaquarterpi. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@Ahmadpashaquarterpi
Copy link
Author

Ahmadpashaquarterpi commented Dec 21, 2023

Hi @PureWeen Here is the sample project
HTMLSample.zip

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels Dec 21, 2023
@PureWeen PureWeen removed the s/needs-attention Issue has more information and needs another look label Dec 21, 2023
@PureWeen PureWeen added this to the Backlog milestone Dec 21, 2023
@ghost
Copy link

ghost commented Dec 21, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@Ahmadpashaquarterpi
Copy link
Author

Is there any workaround for this?
I tried Formatted text that too is showing weird behavior on windows.

@dailyhw
Copy link

dailyhw commented Oct 24, 2024

Are there have any modifications for this? The Color tag in HtmlText still does not work on Windows in MAUI version 8.0.90. I have confirmed that it works fine on Android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-label Label, Span platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants