unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
9.07k stars 735 forks source link

`TextLineBounds` property is not implemented #2795

Open agneszitte opened 4 years ago

agneszitte commented 4 years ago

Current behavior

[All platforms] TextLineBounds property is not implemented https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.textlinebounds

Expected behavior

TextLineBounds property is implemented on all platforms

image

How to reproduce it (as minimally and precisely as possible)

Try to use the TextLineBounds property on a Textblock.

Environment

Nuget Package: Uno.UI

Package Version(s): 2.0.532

Affected platform(s):

Visual Studio:

Anything else we need to know?

Property really useful in some cases, like when using tight for numbers or text in all caps in order to center them inside an ellipse or a border for example. Most of the fonts don't have the same distance at the top or bottom from the baseline. It can be tricky sometimes to perfectly center everything vertically.

As a workaround for now you can use specific margins depending on the platforms to compensate for the distance.

MartinZikmund commented 3 years ago

@ajpinedam Are you planning to check this one?

agneszitte commented 1 year ago

@jeromelaban seeing that this issue is archived, is this wanted?

jeromelaban commented 1 year ago

@agneszitte yes, depending on priority.