public static void MapText(ILabelHandler handler, ILabel label) { handler.PlatformView?.UpdateText(label); // Any text update requires that we update any attributed string formatting MapFormatting(handler, label); }
public static void MapFormatting(ILabelHandler handler, ILabel label) { // Update all of the attributed text formatting properties // Setting any of those may have removed text alignment settings, // so we need to make sure those are applied, too handler.PlatformView?.UpdateHorizontalTextAlignment(label); handler.PlatformView?.UpdateTextDecorations(label); }
public static void MapVerticalTextAlignment(ILabelHandler handler, ILabel label) { handler.PlatformView?.UpdateVerticalTextAlignment(label); }
public static void MapHeight(ILabelHandler handler, ILabel view) => // VerticalAlignment only works when the container's Height is set and the child's Height is Auto. The child's Height // is set to Auto when the container is introduced handler.ToPlatform().UpdateHeight(view);
public static void MapLineHeight(ILabelHandler handler, ILabel label) { }
public static void MapMaxLines(ILabelHandler handler, ILabel label) { }
public static void MapVerticalTextAlignment(ILabelHandler handler, ILabel label) { }
public static void MapCharacterSpacing(ILabelHandler handler, ILabel label) { }
public static void MapLineBreakMode(ILabelHandler handler, ILabel label) { handler.PlatformView?.UpdateLineBreakMode(label); }
public static void MapCharacterSpacing(ILabelHandler handler, ILabel label) { handler.PlatformView?.UpdateCharacterSpacing(label); }
public static void MapText(ILabelHandler handler, ILabel label) => handler.PlatformView?.UpdateText(label);
public static void MapOpacity(ILabelHandler handler, ILabel label) { handler.UpdateValue(nameof(IViewHandler.ContainerView)); handler.PlatformView.UpdateOpacity(label); handler.ToPlatform().UpdateOpacity(label); }
//getting the object of LabelService public LabelService(ILabelHandler handler) { labelHandler = handler; }
public static void MapVerticalTextAlignment(ILabelHandler handler, ILabel label) { handler.UpdateValue(nameof(IViewHandler.ContainerView)); handler.PlatformView?.UpdateVerticalTextAlignment(label); }
public static void MapTextDecorations(ILabelHandler handler, ILabel label) { handler.PlatformView?.UpdateTextDecorations(label); }
public static void MapFont(ILabelHandler handler, ILabel label) { var fontManager = handler.GetRequiredService <IFontManager>(); handler.PlatformView?.UpdateFont(label, fontManager); }
public static void MapPadding(ILabelHandler handler, ILabel label) { handler.PlatformView?.UpdatePadding(label); }
public static void MapMaxLines(ILabelHandler handler, Label label) { handler.PlatformView?.UpdateMaxLines(label); }
public static void MapLineHeight(ILabelHandler handler, ILabel label) { handler.PlatformView?.UpdateLineHeight(label); }
public static void MapHorizontalTextAlignment(ILabelHandler handler, ILabel label) { }
public static void MapBackground(ILabelHandler handler, ILabel label) { handler.UpdateValue(nameof(handler.ContainerView)); handler.ToPlatform()?.UpdateBackground(label); }
public static void MapTextDecorations(ILabelHandler handler, ILabel label) { }
public static void MapTextColor(ILabelHandler handler, ILabel label) { handler.PlatformView?.UpdateTextColor(label); }
public static void MapPadding(ILabelHandler handler, ILabel label) { }
public static void MapHorizontalTextAlignment(ILabelHandler handler, ILabel label) { handler.PlatformView?.UpdateHorizontalTextAlignment(label); }
public static void MapText(ILabelHandler handler, ILabel label) { }
public static void MapLineBreakMode(ILabelHandler handler, ILabel label) { }