Skip to content

Commit c894dd7

Browse files
authored
Optimize Label.CharacterSpacing on initial load (#31391)
1 parent 48cc70f commit c894dd7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Core/src/Handlers/Label/LabelHandler.Windows.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,15 @@ public static void MapText(ILabelHandler handler, ILabel label) =>
5353
public static void MapTextColor(ILabelHandler handler, ILabel label) =>
5454
handler.PlatformView?.UpdateTextColor(label);
5555

56-
public static void MapCharacterSpacing(ILabelHandler handler, ILabel label) =>
56+
public static void MapCharacterSpacing(ILabelHandler handler, ILabel label)
57+
{
58+
if (handler.IsConnectingHandler() && label.CharacterSpacing == 0)
59+
{
60+
return;
61+
}
62+
5763
handler.PlatformView?.UpdateCharacterSpacing(label);
64+
}
5865

5966
public static void MapFont(ILabelHandler handler, ILabel label)
6067
{

0 commit comments

Comments
 (0)