JamSoft.AvaloniaUI.Lcd
1.2.1
dotnet add package JamSoft.AvaloniaUI.Lcd --version 1.2.1
NuGet\Install-Package JamSoft.AvaloniaUI.Lcd -Version 1.2.1
<PackageReference Include="JamSoft.AvaloniaUI.Lcd" Version="1.2.1" />
paket add JamSoft.AvaloniaUI.Lcd --version 1.2.1
#r "nuget: JamSoft.AvaloniaUI.Lcd, 1.2.1"
// Install JamSoft.AvaloniaUI.Lcd as a Cake Addin #addin nuget:?package=JamSoft.AvaloniaUI.Lcd&version=1.2.1 // Install JamSoft.AvaloniaUI.Lcd as a Cake Tool #tool nuget:?package=JamSoft.AvaloniaUI.Lcd&version=1.2.1
Introduction
This is a control providing a form of digital LCD segment display for use within a .NET AvaloniaUI applications.
How To Use The Control
Installation
dotnet add package JamSoft.AvaloniaUI.Lcd --version 1.2.1
Install-Package JamSoft.AvaloniaUI.Lcd -Version 1.2.1
<PackageReference Include="JamSoft.AvaloniaUI.Lcd" Version="1.2.1" />
paket add JamSoft.AvaloniaUI.Lcd --version 1.2.1
Import Styles
<Application.Styles>
<FluentTheme />
<StyleInclude Source="avares://JamSoft.AvaloniaUI.Lcd/Themes/Default.axaml"/>
</Application.Styles>
The default style provided is very simple and be easily replaced.
<Style Selector="lcd|LcdLabel">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type lcd:LcdLabel}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Usage
<lcd:LcdLabel Text="Default" />
We're defining a basic default LCD label, nothing fancy.
Predefined Color Themes
<lcd:LcdLabel Text="Default Purple"
NumberOfCharactersPerLine="14"
ColorScheme="Green"/>
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}"
DotMatrix="Dos5X7"
NumberOfCharactersPerLine="24"
LineSpacing="10"
BorderSpace="10"
PixelSize="Pix4X4" />
Here we have a large LCD display.
Text
is data-bound to the view modelsGreeting
propertyDotMatrix
is set toDos5X7
(defaultMat5X7
)NumberOfCharactersPerLine
is set to24
(default10
)LineSpacing
is set to10
(default2
)BorderSpace
is set to10
(default3
)PixelSize
is set toPix4X4
(defaultPix2X2
)
Custom Pixel Size
<lcd:LcdLabel Text="Custom Pixels" NumberOfCharactersPerLine="13" PixelSize="PixCustom" PixelHeight="2" PixelWidth="8" />
Animations
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}"
NumberOfCharactersPerLine="24"
ColorScheme="Green"
IsAnimated="True"
AnimationSpeed="10"
AnimationStyle="Loop"/>
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.
Properties
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
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Avalonia (>= 11.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.