Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions TextControlBox/Core/CoreTextControlBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,21 @@ public TextControlBoxDesign Design
set => designHelper.Design = value;
}

public Windows.UI.Color TextColor
{
get => designHelper._Design.TextColor;
set
{
if (designHelper._Design.TextColor.Equals(value))
return;

designHelper._Design.TextColor = value;
designHelper.ColorResourcesCreated = false;
textRenderer.NeedsUpdateTextLayout = true;
canvasUpdateManager.UpdateAll();
}
}

public bool ShowLineNumbers
{
get => lineNumberManager._ShowLineNumbers;
Expand Down
13 changes: 13 additions & 0 deletions TextControlBox/TextControlBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,19 @@ public TextControlBoxDesign Design
set => coreTextBox.Design = value;
}

/// <summary>
/// Gets or sets the color of the editor body text.
/// </summary>
/// <remarks>
/// This is the base text color. When syntax highlighting is enabled, per-token colors from the
/// active <see cref="SyntaxHighlighting"/> still take precedence for highlighted tokens.
/// </remarks>
public Windows.UI.Color TextColor
{
get => coreTextBox.TextColor;
set => coreTextBox.TextColor = value;
}

/// <summary>
/// Gets or sets a value indicating whether line numbers should be displayed in the textbox.
/// </summary>
Expand Down