public static void UpdateHorizontalTextAlignment(this UITextView textView, ITextAlignment textAlignment) { // We don't have a FlowDirection yet, so there's nothing to pass in here. // TODO ezhart Update this when FlowDirection is available // (or update the extension to take an IEditor instead of an alignment and work it out from there) textView.TextAlignment = textAlignment.HorizontalTextAlignment.ToPlatform(true); }
public static void UpdateHorizontalTextAlignment(this TextBox textBox, ITextAlignment textAlignment) { // We don't have a FlowDirection yet, so there's nothing to pass in here. // TODO: Update this when FlowDirection is available // (or update the extension to take an ILabel instead of an alignment and work it out from there) textBox.TextAlignment = textAlignment.HorizontalTextAlignment.ToNative(true); }
public static void UpdateHorizontalTextAlignment(this TextView textView, ITextAlignment text) { if (textView.Context !.HasRtlSupport()) { // We want to use TextAlignment where possible because it doesn't conflict with the // overall gravity of the underlying control textView.TextAlignment = text.HorizontalTextAlignment.ToTextAlignment(); }
public static void UpdateHorizontalTextAlignment(this UITextField textField, ITextAlignment textAlignment) { bool isLtr; if (textAlignment is IView v && v.FlowDirection == FlowDirection.LeftToRight) { isLtr = true; }
public static void UpdateHorizontalTextAlignment(this UITextField textField, ITextAlignment textAlignment) { if (textAlignment is IView view) { textField.TextAlignment = textAlignment.HorizontalTextAlignment.ToPlatformHorizontal().AdjustForFlowDirection(view); return; } textField.TextAlignment = textAlignment.HorizontalTextAlignment.ToPlatformHorizontal(); }
public static void UpdateHorizontalTextAlignment(this TextView textView, ITextAlignment text) { if (Rtl.IsSupported) { // We want to use TextAlignment where possible because it doesn't conflict with the // overall gravity of the underlying control textView.TextAlignment = text.HorizontalTextAlignment.ToTextAlignment(); } else { // But if RTL support is not available for some reason, we have to resort // to gravity, because Android will simply ignore text alignment textView.Gravity = Android.Views.GravityFlags.Top | text.HorizontalTextAlignment.ToHorizontalGravityFlags(); } }
public static void UpdateVerticalTextAlignment(this TextBox textBox, ITextAlignment textAlignment) => MauiTextBox.SetVerticalTextAlignment(textBox, textAlignment.VerticalTextAlignment.ToNativeVerticalAlignment());
public static void UpdateVerticalTextAlignment(this TextView textView, ITextAlignment textAlignment) { textView.UpdateVerticalAlignment(textAlignment.VerticalTextAlignment); }
public static void UpdateVerticalTextAlignment(this UITextField textField, ITextAlignment textAlignment) { textField.VerticalAlignment = textAlignment.VerticalTextAlignment.ToPlatformVertical(); }
public static void UpdateVerticalTextAlignment(this Entry platformEntry, ITextAlignment entry) { platformEntry.SetVerticalTextAlignment(entry.VerticalTextAlignment.ToPlatformDouble()); platformEntry.SetVerticalPlaceHolderTextAlignment(entry.VerticalTextAlignment.ToPlatformDouble()); }
public static void UpdateHorizontalTextAlignment(this Entry platformEntry, ITextAlignment entry) { platformEntry.HorizontalTextAlignment = entry.HorizontalTextAlignment.ToPlatform(); }
public static void UpdateVerticalTextAlignment(this EditText editText, ITextAlignment entry) { editText.UpdateVerticalAlignment(entry.VerticalTextAlignment); }
public static void UpdateHorizontalTextAlignment(this EditText editText, ITextAlignment textAlignment) { editText.UpdateHorizontalAlignment(textAlignment.HorizontalTextAlignment); }
public static void UpdateHorizontalTextAlignment(this EditText editText, ITextAlignment textAlignment) { editText.UpdateHorizontalAlignment(textAlignment.HorizontalTextAlignment, editText.Context != null && editText.Context.HasRtlSupport()); }
public static void UpdateVerticalTextAlignment(this Control platformControl, ITextAlignment textAlignment) { platformControl.VerticalAlignment = textAlignment.VerticalTextAlignment.ToPlatformVerticalAlignment(); }