This is a control providing a form of digital LCD segment display for use within a .NET AvaloniaUI applications.

How To Use The Control


dotnet add package JamSoft.AvaloniaUI.Lcd --version 1.1.0
Install-Package JamSoft.AvaloniaUI.Lcd -Version 1.1.0
<PackageReference Include="JamSoft.AvaloniaUI.Lcd" Version="1.1.0" />
paket add JamSoft.AvaloniaUI.Lcd --version 1.1.0

Import Styles

    <FluentTheme Mode="Dark"/>
    <StyleInclude Source="avares://JamSoft.AvaloniaUI.Lcd/Themes/Default.axaml"/>

The default style provided is very simple and be easily replaced.

<Style Selector="lcd|LcdLabel">
    <Setter Property="Template">
            <ControlTemplate TargetType="{x:Type lcd:LcdLabel}">
                <Border Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">


<lcd:LcdLabel Text="Default" />

We’re defining a basic default LCD label, nothing fancy.

Predefined Color Themes

<lcd:LcdLabel Text="Default Purple" 

Here we define a few of the available properties, We’re increasing the number of characters from 10 (the default) to 14 and we have also specified the Purple color scheme.

Multi Line

<lcd:LcdLabel Text="Multi-line" NumberOfTextLines="2" NumberOfCharactersPerLine="5" />

Here we have configured the LCD control to have two lines of text, each with 5 characters.

Alternate Sizes

<lcd:LcdLabel Text="{Binding Greeting}"
              PixelSize="Pix4X4" />

Here we have a large LCD display.

  • Text is data-bound to the view models Greeting property
  • DotMatrix is set to Dos5X7 (default Mat5X7)
  • NumberOfCharactersPerLine is set to 24 (default 10)
  • LineSpacing is set to 10 (default 2)
  • BorderSpace is set to 10 (default 3)
  • PixelSize is set to Pix4X4 (default Pix2X2)

Custom Pixel Size

<lcd:LcdLabel Text="Custom Pixels" NumberOfCharactersPerLine="13" PixelSize="PixCustom" PixelHeight="2" PixelWidth="8" />


You can animate the LCD contents by setting the IsAnimated property to True and using the animation properties to control various aspects of the animation behaviour.

<lcd:LcdLabel Text="{Binding Greeting}"

The AnimationSpeed property controls the speed in FPS. The value used here is divided by 1000. The AnimationStyle property controls the overall behaviour of the animation. The two options are Loop and Contiguous. Looped content will cycle to completion whereas Contiguous content cycles the string in a continuous stream of characters.


ColorScheme PixelSize DotMatrix PixelSpacing CharacterSpacing LineSpacing BorderSpace NumberOfTextLines NumberOfCharactersPerLine PixelOnColor PixelOffColor LcdBackgroundColor PixelWidth PixelHeight Text HalfIntensity IsAnimated AnimationStyle AnimationSpeed

ColorScheme Options

Default Red Green Blue Purple LightBlue Yellow

DotMatrix Options

Mat5X7 Mat5X8 Mat7X9 Mat9X12 Hitachi Hitachi2 Dos5X7

PixelSize Options

Pix1X1 Pix2X2 Pix3X3 Pix4X4 Pix5X5 Pix6X6 Pix7X7 Pix8X8 Pix9X9 Pix10X10 Pix11X11 Pix12X12 Pix13X13 Pix14X14 Pix15X15 Pix16X16 Custom

AnimationStyle Options

Loop Contiguous