public void ChangeCaret(CaretStyle caretStyle) { CurrentCaretStyle = caretStyle; RemoveChild(Children.First(node => node is MyIElement)); if (caretStyle != CaretStyle.None) { switch (caretStyle) { case CaretStyle.Up: AppendChild(new MyIElement() { ClassName = "fas fa-sort-up float-right", Style = { LineHeight = 1.5 } }); break; case CaretStyle.Down: AppendChild(new MyIElement() { ClassName = "fas fa-sort-down float-right", Style = { LineHeight = 1.5 } }); break; case CaretStyle.UpDown: AppendChild(new MyIElement() { ClassName = "fas fa-sort float-right", Style = { LineHeight = 1.5 } }); break; default: throw new ArgumentOutOfRangeException(nameof(caretStyle), caretStyle, null); } } }
public TableHeadEntry(string scope, string value, CaretStyle caretStyle = CaretStyle.None, StylingColor color = StylingColor.Light) : base("th") { CurrentCaretStyle = caretStyle; if (scope != "") { SetAttribute("scope", scope); } if (value != "") { Text = value; } if (caretStyle != CaretStyle.None) { switch (caretStyle) { case CaretStyle.Up: AppendChild(new MyIElement() { ClassName = "fas fa-sort-up float-right", Style = { LineHeight = 1.5 } }); break; case CaretStyle.Down: AppendChild(new MyIElement() { ClassName = "fas fa-sort-down float-right", Style = { LineHeight = 1.5 } }); break; case CaretStyle.UpDown: AppendChild(new MyIElement() { ClassName = "fas fa-sort float-right", Style = { LineHeight = 1.5 } }); break; default: throw new ArgumentOutOfRangeException(nameof(caretStyle), caretStyle, null); } } if (color != StylingColor.Light) { ClassName = "table-" + Enum.GetName(typeof(StylingColor), color).ToLower(); } }
private void ResetStyle() { Style = CaretStyle.Line; }
/// <summary> /// Initializes a new instance of the TextBoxStyle class. /// </summary> protected EditBoxStyle() { this.UseCaret = true; this.caretStyle = new CaretStyle(); }