An open API service indexing awesome lists of open source software.

https://github.com/tsjdev-apps/sevensegmentdisplay-maui

A customizable seven-segment display control for .NET MAUI built with SkiaSharp, featuring glow effects, animations, MVVM support, and full cross-platform compatibility.
https://github.com/tsjdev-apps/sevensegmentdisplay-maui

cross-platform custom-control dotnet dotnet-maui maui mvvm seven-segment-display skiasharp ui

Last synced: about 10 hours ago
JSON representation

A customizable seven-segment display control for .NET MAUI built with SkiaSharp, featuring glow effects, animations, MVVM support, and full cross-platform compatibility.

Awesome Lists containing this project

README

          

# Seven Segment Display with .NET MAUI

A .NET MAUI sample app that demonstrates a reusable `SevenSegmentDisplay` control rendered manually with SkiaSharp 4.

![header](/docs/header.png)

## Features

- Reusable MAUI control built on `SKCanvasView`
- Classic seven-segment geometry with rounded polygon segments
- Active, inactive, background, glow, spacing, thickness, radius, opacity, and alignment bindable properties
- Lightweight text-change pulse animation
- Digital clock, countdown, and status display demos
- Light and dark theme support through MAUI `AppThemeBinding`
- MVVM demo state using `CommunityToolkit.Mvvm`
- NUnit coverage for segment mapping and design-space constants
- Central package management through `Directory.Packages.props`

## Screenshots

![screenshot-01](/docs/screenshot-01.png)

![screenshot-02](/docs/screenshot-02.png)

## Repository Structure

```text
.editorconfig
Directory.Build.props
Directory.Packages.props
NuGet.config
MauiSevenSegmentDisplay.slnx
README.md
docs/
└── maui-ui-july-2026-seven-segment-display.md
src/
└── MauiSevenSegmentDisplay/
├── Controls/
├── Pages/
├── ViewModels/
├── App.xaml
├── AppShell.xaml
├── MauiProgram.cs
└── MauiSevenSegmentDisplay.csproj
tests/
└── MauiSevenSegmentDisplay.Tests/
├── SegmentCharacterMapTests.cs
├── SevenSegmentOptionsTests.cs
└── MauiSevenSegmentDisplay.Tests.csproj
```

The generated MAUI `Platforms`, `Properties`, and `Resources` folders are also included so the app can build and run on Android, iOS, Mac Catalyst, and Windows.

## Run

From the repository root:

```bash
dotnet build MauiSevenSegmentDisplay.slnx
dotnet test MauiSevenSegmentDisplay.slnx
```

## SevenSegmentDisplay

`SevenSegmentDisplay` is a reusable control in `src/MauiSevenSegmentDisplay/Controls`. It exposes bindable properties for text, colors, glow, segment sizing, animation, and alignment. The renderer uses a simple design-space model and scales it to the current Skia canvas size, so the display adapts to phones, tablets, and desktop windows.

`SegmentCharacterMap` maps characters to the seven named segment flags. Unsupported characters render as blanks, which keeps the control safe for arbitrary bound text.

## Tests

The NUnit test project lives in `tests/MauiSevenSegmentDisplay.Tests`. It verifies the character-to-segment mapping and the design-space constants that drive the Skia renderer.

## Example XAML

```xml

```

## Read the Article

For a detailed walkthrough of the control’s architecture, seven-segment geometry, SkiaSharp rendering, bindable properties, animations, and demo application, read the accompanying Medium article:

[Building a Seven-Segment Display Control with .NET MAUI and SkiaSharp](https://medium.com/@tsjdevapps/building-a-seven-segment-display-control-with-net-maui-and-skiasharp-739adf1ca8d9)