public override TextRun CreateTextRun(int startVisualColumn, ITextRunConstructionContext context) { if (ForegroundBrush != null) { TextRunProperties.SetForegroundBrush(ForegroundBrush); } return(base.CreateTextRun(startVisualColumn, context)); }
/// <inheritdoc/> public override TextRun CreateTextRun(int startVisualColumn, ITextRunConstructionContext context) { TextRunProperties.SetForegroundBrush(context.TextView.LinkTextForegroundBrush); TextRunProperties.SetBackgroundBrush(context.TextView.LinkTextBackgroundBrush); if (context.TextView.LinkTextUnderline) { TextRunProperties.SetTextDecorations(TextDecorations.Underline); } return(base.CreateTextRun(startVisualColumn, context)); }
public override TextRun CreateTextRun(int startVisualColumn, ITextRunConstructionContext context) { if (context == null) { throw new ArgumentNullException(nameof(context)); } TextRunProperties.SetForegroundBrush(Brushes.Plum); return(base.CreateTextRun(startVisualColumn, context)); }
public override TextRun CreateTextRun(int startVisualColumn, ITextRunConstructionContext context) { TextRunProperties.SetForegroundBrush(ForegroundBrush); var lineNumber = TextDocument.GetLineByOffset(context.VisualLine.StartOffset).LineNumber; if (LinkIsClickable() && EnvDteHelper.LineNumber == lineNumber && EnvDteHelper.CurrentColumn >= RelativeTextOffset && EnvDteHelper.CurrentColumn <= RelativeTextOffset + VisualLength) { TextRunProperties.SetTextDecorations(TextDecorations.Underline); } return(base.CreateTextRun(startVisualColumn, context)); }
public override TextRun CreateTextRun(int startVisualColumn, ITextRunConstructionContext context) { var foreground = ThemeManager.Current.GetThemeColorBrush(ThemeColorStyle.DefaultForeground); var background = ThemeManager.Current.GetThemeColorBrush(ThemeColorStyle.DefaultBackground); TextRunProperties.SetBackgroundBrush(background); TextRunProperties.SetForegroundBrush(foreground); var spacesBuilder = new StringBuilder(); for (var i = 0; i < VisualLength - 1; i++) { spacesBuilder.Append(Symbols.Space); } spacesBuilder.Append(Symbols.VerticalBar); var textCharacters = new TextCharacters(spacesBuilder.ToString(), TextRunProperties); return(textCharacters); }
public override TextRun CreateTextRun(int startVisualColumn, ITextRunConstructionContext context) { TextRunProperties.SetForegroundBrush(Brushes.LightBlue); TextRunProperties.SetTextDecorations(TextDecorations.Underline); return(base.CreateTextRun(startVisualColumn, context)); }
public override TextRun CreateTextRun(int startVisualColumn, ITextRunConstructionContext context) { TextRunProperties.SetForegroundBrush(System.Windows.Media.Brushes.GreenYellow); TextRunProperties.SetTextDecorations(TextDecorations.Underline); return(base.CreateTextRun(startVisualColumn, context)); }