---
description: >-
  This feature manages the digital display portion of the gauge, controlling the
  colors and visual effects of both the display area and the individual LED
  segments.
---

# LED Display Settings

## Overview

LED Display Settings allow developers to customize the digital readout of the gauge by defining the display’s background, border properties, and the appearance of the LED segments (both lit and unlit). This includes properties that control glow intensity and brightness, ensuring the display can mimic an LED look that is both modern and highly legible.

***

### Key Points

<table><thead><tr><th width="245">Aspect</th><th>Details</th></tr></thead><tbody><tr><td>Display Background Color</td><td>Controlled by the <code>DisplayBackColor</code> property to set the LED display’s background.</td></tr><tr><td>Display Border</td><td><code>DisplayBorderColor</code> and <code>DisplayBorderWidth</code> properties determine the color and thickness of the display’s border.</td></tr><tr><td>LED Segment Colors</td><td><code>SegmentOnColor</code> for active (lit) segments and <code>SegmentOffColor</code> for inactive segments define the LED visual appearance.</td></tr><tr><td>LED Visual Effects</td><td><code>SegmentGlowIntensity</code> controls the intensity of the glow on lit segments, while <code>SegmentBrightness</code> adjusts overall LED brightness.</td></tr></tbody></table>

***

### Best Practices

<table><thead><tr><th width="322">Recommendation</th><th>Description</th></tr></thead><tbody><tr><td>Set Consistent Color Themes</td><td>Choose display and segment colors that align with your overall UI theme to create a coherent visual experience.</td></tr><tr><td>Adjust Glow and Brightness Carefully</td><td>Experiment with <code>SegmentGlowIntensity</code> and <code>SegmentBrightness</code> values within the 0.0 to 1.0 range to achieve the desired LED effect without overdoing it.</td></tr><tr><td>Use High-Contrast Colors</td><td>To ensure readability, use contrasting colors for the display background and the LED segments, particularly in low-light environments.</td></tr><tr><td>Test on Multiple Displays</td><td>Verify that the LED display settings look as expected across different screen resolutions and brightness settings.</td></tr></tbody></table>

***

### Common Pitfalls

| Pitfall                                       | Explanation                                                                                                                                               |
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Overly High Glow or Brightness Values         | Setting values for `SegmentGlowIntensity` or `SegmentBrightness` too high may result in an overly saturated or washed-out appearance.                     |
| Inconsistent Color Pairings                   | Using display and segment colors that do not contrast enough can make the LED readout difficult to read or appear unprofessional.                         |
| Ignoring Display Border Settings              | Omitting or misconfiguring `DisplayBorderWidth` and `DisplayBorderColor` can lead to a display that blends into the gauge background or looks incomplete. |
| Changing Properties at Runtime Without Redraw | When properties are updated at runtime, ensure the control is invalidated so that the changes are immediately visible.                                    |

***

### Usage Scenarios

<table><thead><tr><th width="286">Scenario</th><th>Implementation Details</th></tr></thead><tbody><tr><td>Standalone Digital Readout</td><td>Customize the digital display with a dark background (<code>DisplayBackColor</code>) and a contrasting border (<code>DisplayBorderColor</code> and <code>DisplayBorderWidth</code>) to mimic a classic LED clock.</td></tr><tr><td>Alert or Status Indicator</td><td>Change the <code>SegmentOnColor</code> dynamically to signal an alert (for example, switching from green to red) while maintaining a consistent <code>SegmentOffColor</code>.</td></tr><tr><td>Themed Dashboard Integration</td><td>Integrate the gauge into a dashboard by matching the LED display colors with the application’s overall color palette, ensuring visual consistency across the UI.</td></tr></tbody></table>

***

### Real Life Usage Scenarios

<table><thead><tr><th width="262">Scenario</th><th>Example Description</th></tr></thead><tbody><tr><td>Industrial Control Panels</td><td>Use LED Display Settings to mimic traditional industrial gauges where the digital readout is vital for monitoring pressure, temperature, or speed.</td></tr><tr><td>Financial Dashboards</td><td>Implement a modern LED look to display key performance indicators (KPIs) or stock values in a high-tech, digital format.</td></tr><tr><td>Medical Monitoring Systems</td><td>Present vital signs such as heart rate or oxygen saturation using a clear, high-contrast LED display that is easily readable in varying lighting conditions.</td></tr></tbody></table>

***

### Troubleshooting Tips

<table><thead><tr><th width="342">Issue</th><th>Troubleshooting Approach</th></tr></thead><tbody><tr><td>LED Display Appears Faded or Oversaturated</td><td>Adjust <code>SegmentBrightness</code> and <code>SegmentGlowIntensity</code> within the 0.0–1.0 range; ensure that the selected colors provide adequate contrast for visibility.</td></tr><tr><td>Border Not Appearing Correctly</td><td>Verify that <code>DisplayBorderWidth</code> is set to a value greater than 0 and that <code>DisplayBorderColor</code> is properly assigned; call <code>Invalidate()</code> if changes are not shown immediately.</td></tr><tr><td>Inconsistent LED Segment Appearance</td><td>Ensure that updates to <code>SegmentOnColor</code> and <code>SegmentOffColor</code> are made prior to rendering the control; consider triggering a manual redraw if changes do not appear.</td></tr></tbody></table>

***

### Code Examples and Integration Samples

#### Example 1: Basic LED Display Setup

```csharp
// Create a new instance of the gauge
SiticoneGaugeDigital gauge = new SiticoneGaugeDigital();

// Configure the LED display background and border
gauge.DisplayBackColor = Color.Black;
gauge.DisplayBorderColor = Color.FromArgb(60, 60, 70);
gauge.DisplayBorderWidth = 2f;

// Set initial segment colors for a classic red LED appearance
gauge.SegmentOnColor = Color.Red;
gauge.SegmentOffColor = Color.DarkRed;

// Add the gauge control to the form
this.Controls.Add(gauge);
gauge.Location = new Point(10, 10);
gauge.Size = new Size(300, 300);
```

#### Example 2: Customizing LED Glow and Brightness

```csharp
// Configure LED segment glow and brightness
gauge.SegmentGlowIntensity = 0.7f;  // Adjust the intensity of the glow for active segments
gauge.SegmentBrightness = 1.0f;     // Set overall LED brightness

// Optionally, update these properties dynamically based on application logic
// For example, in an event handler to simulate a change in conditions:
void UpdateLEDDisplayVisuals(float newIntensity, float newBrightness)
{
    gauge.SegmentGlowIntensity = newIntensity;
    gauge.SegmentBrightness = newBrightness;
    gauge.ForceRedraw(); // Ensure changes are rendered immediately
}
```

#### Example 3: Integrating LED Display Settings with Other Gauge Features

```csharp
// Set up basic gauge core properties first
gauge.MinValue = 0;
gauge.MaxValue = 100;
gauge.Value = 50;

// Configure LED display properties as above
gauge.DisplayBackColor = Color.Black;
gauge.DisplayBorderColor = Color.Gray;
gauge.DisplayBorderWidth = 3f;
gauge.SegmentOnColor = Color.LimeGreen;
gauge.SegmentOffColor = Color.DarkGreen;
gauge.SegmentGlowIntensity = 0.6f;
gauge.SegmentBrightness = 0.9f;

// Add sections (for example, for critical thresholds)
gauge.ClearSections();
gauge.AddSection(new GaugeSection(70, 100, Color.Red));

// Optionally subscribe to events to update external indicators
gauge.ValueChanged += (s, e) => { Console.WriteLine("Gauge value updated."); };
```

***

### Review

<table><thead><tr><th width="173">Aspect</th><th>Review Comments</th></tr></thead><tbody><tr><td>Visual Impact</td><td>LED Display Settings provide a modern and easily customizable digital readout that enhances the overall gauge aesthetic.</td></tr><tr><td>Integration Ease</td><td>Simple property settings and clear code examples make it straightforward to integrate LED display customization into any .NET WinForms application.</td></tr><tr><td>Customizability</td><td>With properties for background, border, and segment effects, the LED display can be tailored to a wide variety of themes and application contexts.</td></tr></tbody></table>

***

### Summary

LED Display Settings are a crucial part of the SiticoneGaugeDigital control, offering granular control over the digital readout’s appearance. By properly configuring the display background, border, and LED segment properties—including glow intensity and brightness—developers can create an attractive, legible, and dynamic LED display that complements the overall gauge functionality.

***

### Additional Sections

#### Implementation Tips

<table><thead><tr><th width="262">Tip</th><th>Description</th></tr></thead><tbody><tr><td>Consistent Color Choices</td><td>Match display colors with the overall application theme to maintain a consistent visual identity.</td></tr><tr><td>Runtime Updates</td><td>When updating LED settings at runtime, use the <code>ForceRedraw()</code> method to immediately reflect changes on the control.</td></tr><tr><td>Testing Across Environments</td><td>Verify that the LED display maintains its legibility on different screen types and in various lighting conditions.</td></tr></tbody></table>

#### Future Enhancements

<table><thead><tr><th width="289">Enhancement</th><th>Possibility</th></tr></thead><tbody><tr><td>Dynamic LED Color Shifts</td><td>Introduce functionality to change LED segment colors dynamically based on real-time data conditions (e.g., temperature or pressure fluctuations).</td></tr><tr><td>Enhanced Border Customization</td><td>Allow customization of border styles (e.g., dashed or dotted) to further integrate the gauge display with the application’s design language.</td></tr><tr><td>User-Defined Glow Effects</td><td>Enable more advanced configuration of the glow effect, such as customizable gradient glows or pulsating effects that synchronize with data updates.</td></tr></tbody></table>

***

This extensive documentation on LED Display Settings should help developers understand how to leverage the control’s display features to create a visually appealing and highly functional digital readout for their gauge implementations.
