This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] When changing the Style of the Label at runtime, TextDecorations property setting in Style not working #9110
Comments
I think the same issue can be reproduced when using DataTrigger also. This issue and the below issue seems related to one another. |
Simpler repro: |
Please confirm whether fixing the below issue will resolve this issue also? |
Can you please update on this ? |
Can you please update the timeline for this issue? |
Could you please update on this? |
Can you please update the timeline for this issue? |
I'm seeing a similar issue using sfListView (version 18.1.0.57) with labels on iOS (no problem on Android). |
Still broke on iOS |
This is still a real, and annoying problem. Any workarounds?! The buttons are also affected by this..... |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
When changing the Style of the Label at runtime, TextDecorations property setting in Style not working.
Steps to Reproduce
Sample
styling-issue.zip
The above one is the basic use case. I have reproduced the issue since we have faced issue with SfListView of Syncfusion. In the same attached sample, Style1 applied for a level inside ListView ItemTemplate if contactname is kyle and style2 applied otherwise. But TextDecoration alone not updated when scrolling the SfListView.
Note: I have tested the same against Xamarin.Forms CollectionView and it worked with Xamarin.Forms CollectionView.
Test in UWP and Android and issue reproduced. Not tested in iOS.
Expected Behavior
When switching between Style1 and Style2, TextDecorations not changed correctly.
<Style x:Key="Style1" Class="Style1" TargetType="Label"> <Setter Property="FontSize" Value="12" /> <Setter Property="HorizontalOptions" Value="FillAndExpand" /> <Setter Property="TextDecorations" Value="None" /> <Setter Property="TextColor" Value="Red" /> </Style>
<Style x:Key="Style2" Class="Style2" TargetType="Label"> <Setter Property="FontSize" Value="16" /> <Setter Property="HorizontalOptions" Value="FillAndExpand" /> <Setter Property="TextDecorations" Value="Underline" /> <Setter Property="TextColor" Value="Green" /> </Style>
Actual Behavior
Basic Information
Screenshots
Initial Loading

After clicking Change Style Buton, Style 1 applied.

Again after clicking the change style button, style 2 applied.

Again after clicking the change style button, style1 applied. But textdecoration applied from Style 2 is not removed.

Reproduction Link
The text was updated successfully, but these errors were encountered: