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!!
TextLineBounds property is implemented on all platforms
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):
[x] iOS
[x] Android
[x] WebAssembly
[x] WebAssembly renderers for Xamarin.Forms
[x] macOS
[ ] Windows
[ ] Build tasks
[ ] Solution Templates
Visual Studio:
[ ] 2017 (version: )
[x] 2019 (version: 16.4.6)
[ ] for Mac (version: )
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.
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
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.