//using System.Collections.Generic; //using System.Text; //using MPKey = MessagePack.KeyAttribute; //using MPObj = MessagePack.MessagePackObjectAttribute; //using N_JsonProperty = Newtonsoft.Json.JsonPropertyAttribute; //using S_JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute; //namespace System.Application.UI.ViewModels.RichText //{ // [MPObj] // [Serializable] // public class TextViewModel : Serializable // { // [MPKey(0)] // [N_JsonProperty("q")] // [S_JsonProperty("q")] // public List Spans { get; set; } = new List(); // /// // /// android:textColor // /// Text color. // /// May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name". // /// May be a color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb". // /// // [MPKey(1)] // [N_JsonProperty("w")] // [S_JsonProperty("w")] // public string? FontColor { get; set; } // /// // /// android:textSize // /// Size of the text. Recommended dimension type for text is "sp" for scaled-pixels (example: 15sp). // /// May be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px(pixels), dp(density-independent pixels), sp(scaled pixels based on preferred font size), in (inches), and mm(millimeters). // /// // [MPKey(2)] // [N_JsonProperty("e")] // [S_JsonProperty("e")] // public float? FontSize { get; set; } // /// // /// android:lineSpacingMultiplier // /// Extra spacing between lines of text, as a multiplier.The value will not be applied for the last line of text. // /// May be a floating point value, such as "1.2". // /// // [MPKey(3)] // [N_JsonProperty("r")] // [S_JsonProperty("r")] // public float? LineSpacingMultiplier { get; set; } // /// // /// android:lineSpacingExtra // /// Extra spacing between lines of text.The value will not be applied for the last line of text. // /// May be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp(scaled pixels based on preferred font size), in (inches), and mm(millimeters). // /// // [MPKey(4)] // [N_JsonProperty("t")] // [S_JsonProperty("t")] // public float? LineSpacingExtra { get; set; } // public override string ToString() // { // if (Spans.Any_Nullable()) // { // var @string = new StringBuilder(); // foreach (var item in Spans) // { // if (item.NewLine) // { // @string.AppendLine(item.Text); // } // else // { // @string.Append(item.Text); // } // } // return @string.ToString(); // } // return string.Empty; // } // } //}