/// <summary> /// Writes something using the secondary color /// </summary> /// <param name="sequence">The sequence.</param> /// <param name="text">The text.</param> public virtual void WriteSecondary(IInlineSequence sequence, string text) { sequence.PushColor(ViewModel.Theme.SecondaryTextColor); sequence.AppendText(text); StringBuilder.Append(text); sequence.PopFormatting(); }
public override void GenerateSequence(IInlineSequence sequence) { if (sequence == null) { throw new ArgumentNullException(nameof(sequence)); } sequence.AppendText("\n"); }
public override void GenerateSequence (IInlineSequence sequence) { if (sequence == null) throw new ArgumentNullException(nameof(sequence)); if (Color != null) sequence.PushColor(Color.Value); if (Background != null) sequence.PushBackground(Background.Value); if (Text != null) { sequence.AppendText(Text); } else { foreach (InlineElement child in VisualChildren.Cast<InlineElement>()) child.GenerateSequence(sequence); } if (Background != null) sequence.PopFormatting(); if (Color != null) sequence.PopFormatting(); }
public override void GenerateSequence(IInlineSequence sequence) { if (sequence == null) { throw new ArgumentNullException(nameof(sequence)); } if (Color != null) { sequence.PushColor(Color.Value); } if (Background != null) { sequence.PushBackground(Background.Value); } if (Text != null) { sequence.AppendText(Text); } else { foreach (InlineElement child in VisualChildren.Cast <InlineElement>()) { child.GenerateSequence(sequence); } } if (Background != null) { sequence.PopFormatting(); } if (Color != null) { sequence.PopFormatting(); } }
public override void GenerateSequence (IInlineSequence sequence) { if (sequence == null) throw new ArgumentNullException(nameof(sequence)); sequence.AppendText("\n"); }