ITextAlignment Interface Extension Methods
Version:
v9.x
In FmgLib.MauiMarkup, all classes that implement the ITextAlignment interface get the following extension methods:
TextCenterHorizontalTextCenterVerticalTextCenterTextLeftTextRightTextBottomTextBottomLeftTextBottomRightTextTopTextTopLeftTextTopRightTextTopCenterTextBottomCenterTextCenterLeftTextCenterRightAlignText
Usage
To use the extension methods, create a Label object (or any object that implements ITextAlignment), and call the desired method:
new Label().TextCenter()
This example centers the text both horizontally and vertically within the label's containing element.