Dirkster.HL 1.0.0

An extended highlighting manager for AvalonEdit that associates highlighting definitions and highlighting themes with WPF (Dark/Light) themes.

There is a newer version of this package available.
See the version list below for details.
Install-Package Dirkster.HL -Version 1.0.0
dotnet add package Dirkster.HL --version 1.0.0
<PackageReference Include="Dirkster.HL" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dirkster.HL --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ThemedHighlightingManager for AvalonEdit

This AvalonEdit extension implements its own highlighting manager that extends the normal way of handling highlighting definitions.

The standard highlighting in AvalonEdit is dependent on the currently viewed type
of text (eg C# or SQL) but a highlighting definition designed for a <b>Light</b> WPF theme may look ugly if viewed with a <b>dark</b>
WPF theme, and vice versa. This is why the <b>ThemedHighlightingManager</b> extension associates each highlighting definition
with:

  • A type of text (C#, SQL etc) and
  • A WPF Theme (Light, Dark)

This approach is very similar to the implementation in Notepad++ except notepad++ uses a plain xml file to configure a theme whereas the ThemedHighlightingManager uses an XSHTD file to do the same. But at the end of the day its XML in both cases and cloning a highlighting theme from Notepad++ is almost too easy (thats how similar both implementations are).

Assuming that you already use a WPF theming library, such as:

enables an applications author to switch highlighting definitions to a matching color palette whenever the user
switches a given WPF theme. See AvalonEditHighlightingThemes
and Aehnlich for sample implementations.

ThemedHighlightingManager for AvalonEdit

This AvalonEdit extension implements its own highlighting manager that extends the normal way of handling highlighting definitions.

The standard highlighting in AvalonEdit is dependent on the currently viewed type
of text (eg C# or SQL) but a highlighting definition designed for a <b>Light</b> WPF theme may look ugly if viewed with a <b>dark</b>
WPF theme, and vice versa. This is why the <b>ThemedHighlightingManager</b> extension associates each highlighting definition
with:

  • A type of text (C#, SQL etc) and
  • A WPF Theme (Light, Dark)

This approach is very similar to the implementation in Notepad++ except notepad++ uses a plain xml file to configure a theme whereas the ThemedHighlightingManager uses an XSHTD file to do the same. But at the end of the day its XML in both cases and cloning a highlighting theme from Notepad++ is almost too easy (thats how similar both implementations are).

Assuming that you already use a WPF theming library, such as:

enables an applications author to switch highlighting definitions to a matching color palette whenever the user
switches a given WPF theme. See AvalonEditHighlightingThemes
and Aehnlich for sample implementations.

Release Notes

Inital release contains 5 highlighting themes (Dark, Light, True Blue-Light, True Blue-Dark, VS 2019-Dark) but you can easily define more themes. Just create a pull request with the XSHTD file at the original project site.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.3 125 6/26/2019
1.0.2 70 6/24/2019
1.0.1 65 6/24/2019
1.0.0 71 6/24/2019