Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs WiFi Button

Siticone WiFi Button

The SiticoneWiFiButton is an advanced network control that provides rich visualization of WiFi connection states. It goes beyond static icons by including real-time monitoring (via Windows WLAN API), gradient signal bars, secure lock indicators, and sophisticated searching animations (Pulse, Radar, Modern).

Connection & State

Properties controlling the connection status and signal quality representation.

Property Type Description & Usage Example
State WiFiState wifiBtn.State = WiFiState.Searching; Sets the visual state (e.g., Connected, Searching, AirplaneMode, NoSignal). Triggers animation loops for active states like Searching.
SignalStrengthDbm int wifiBtn.SignalStrengthDbm = -55; Sets the signal strength in dBm. Automatically updates the State (Good/Fair/Weak) based on standard thresholds (-60, -70, etc.).
IsWiFiSecured bool wifiBtn.IsWiFiSecured = true; If true, overlays a small "Lock" icon on the control to indicate an encrypted connection.
ShowGradientSignalStrength bool wifiBtn.ShowGradientSignalStrength = true; When enabled, signal bars use gradient opacity to show precise signal strength, rather than just full/empty bars.

Real-Time Monitoring

The control can automatically interface with the Windows Native WiFi API (wlanapi.dll) to reflect the actual system connection status.

Property Type Description & Usage Example
EnableRealTimeDetection bool wifiBtn.EnableRealTimeDetection = true; Activates background monitoring. The control will update its State, SignalStrengthDbm, and CurrentSSID automatically based on the OS status.
RealTimeMonitoringInterval int wifiBtn.RealTimeMonitoringInterval = 2000; The frequency (in ms) at which the control polls the system for WiFi changes.
CurrentSSID string var net = wifiBtn.CurrentSSID; Read-only. Returns the name (SSID) of the currently connected network if monitoring is active.

Appearance & Layout

Customize the geometry, border, and internal scaling of the WiFi icon.

Property Type Description & Usage Example
IconScale int wifiBtn.IconScale = 120; Scales the WiFi icon size (percentage). Default is 150.
DotSize int wifiBtn.DotSize = 8; The size (in pixels) of the central dot at the base of the signal bars.
SignalSpacing int wifiBtn.SignalSpacing = 60; Controls the distance between the signal arcs (percentage).
BorderThickness int wifiBtn.BorderThickness = 2; The width of the outer border. Set to 0 to remove.
LockScale int wifiBtn.LockScale = 100; Scales the size of the "Secure" lock icon overlay.
SlashThickness int wifiBtn.SlashThickness = 3; Thickness of the diagonal line drawn when State is WiFiState.Off.

Colors

Full control over the color palette for every state.

Property Type Description & Usage Example
ActiveColor Color wifiBtn.ActiveColor = Color.DodgerBlue; Color for filled signal bars or active elements.
InactiveColor Color wifiBtn.InactiveColor = Color.Gray; Color for empty signal bars.
WarningColor Color wifiBtn.WarningColor = Color.Orange; Used when State is Warning.
ErrorColor Color wifiBtn.ErrorColor = Color.Red; Used when State is Error.
OffLineColor Color wifiBtn.OffLineColor = Color.Black; Color of the slash line when WiFi is Off.
LockColor Color wifiBtn.LockColor = Color.LimeGreen; Color of the security lock icon.

Animation & Effects

Configuration for interaction feedback and status animations.

Property Type Description & Usage Example
SearchingAnimationStyle SearchingAnimation wifiBtn.SearchingAnimationStyle = SearchingAnimation.Radar; Style of animation when searching:
  • Default: Sequential bar lighting.
  • Modern: Smooth wave effect.
  • Radar: Expanding circular pulse.
AnimationSpeed int wifiBtn.AnimationSpeed = 400; Duration (ms) for animation cycles.
EnableRippleEffect bool wifiBtn.EnableRippleEffect = true; Enables the material-design click ripple.
UltraFastMode bool wifiBtn.UltraFastMode = true; Disables cosmetic effects (ripples, hover fades, press scales) for maximum rendering performance.

Events

Events to handle state changes, monitoring updates, and animation cycles.

StateChanged
// Fired when the WiFiState changes (either manually or via auto-detection).
wifiButton1.StateChanged += (sender, e) =>
{
                if (e.NewState == WiFiState.Connected)
    {
                Console.WriteLine($"Connected to {e.SSID}");
    }
                else if (e.NewState == WiFiState.NoSignal)
    {
                Console.WriteLine("Connection lost.");
    }
};
SignalStrengthChanged
// Fired when the dBm signal strength updates.
wifiButton1.SignalStrengthChanged += (sender, e) =>
{
    lblSignal.Text = $"Signal: {e.SignalStrengthDbm} dBm";
    
                if (e.SignalStrengthDbm < -80)
    {
        lblQuality.Text = "Poor Connection";
        lblQuality.ForeColor = Color.Red;
    }
};
RealTimeStateDetected
// Fired by the background monitor when the OS reports a status change.
wifiButton1.RealTimeStateDetected += (sender, e) =>
{
                if (e.AirplaneModeEnabled)
    {
                MessageBox.Show("Device is in Airplane Mode.");
    }
                Debug.WriteLine($"Detected SSID: {e.SSID}");
};

Designer Support

The control offers extensive Smart Tags for rapid configuration directly in the Visual Studio designer.

Category Features
Apply Themes Base Themes: Default, Light, Dark.
Color Themes: Red, Green, Purple, Orange.
Styled Themes: Material, Windows 11, Flat Minimal, Neon, High Contrast.
Status Themes Presets for specific scenarios: Success, Warning, Danger.
Performance Quick toggle for Ultra Fast Mode to disable heavy animations.
Copy/Paste Copy all visual settings from one WiFi button and paste them onto another.

Enumerations

WiFiState Enum
public enum WiFiState
{
    AirplaneMode, // Device radio is off
    Off,          // WiFi specific radio is off
    NoSignal,     // On, but not connected
    Searching,    // Actively scanning (triggers animation)
    Weak,         // Low signal strength
    Fair,         // Medium signal strength
    Good,         // High signal strength
    Error,        // Hardware or connection error
    Warning       // Connectivity issues (e.g., No Internet)
}

Detailed Examples

Example 1: Monitoring System WiFi

Enables the built-in monitor to track the actual Windows WiFi status.

C# - Auto Monitor
public void InitializeWiFiMonitor()
{
                // Enable the background thread monitor
    wifiButton1.EnableRealTimeDetection = true;
    wifiButton1.RealTimeMonitoringInterval = 2000; // Check every 2 seconds

                // Handle updates
    wifiButton1.RealTimeStateDetected += (s, e) =>
    {
        lblStatus.Text = $"Network: {e.SSID} ({e.SignalStrengthDbm}dBm)";
        
                if (e.DetectedState == WiFiState.Good)
            lblStatus.ForeColor = Color.Green;
                else
            lblStatus.ForeColor = Color.Gray;
    };
}

Example 2: Manual Simulation

Manually updating the state based on external data (e.g., from a remote device).

C# - Remote Device Status
public void UpdateRemoteStatus(int remoteRssi)
{
                // Manually set the dBm value. 
                // The control will automatically calculate if it is Weak, Fair, or Good.
    wifiRemote.SignalStrengthDbm = remoteRssi;

                // Custom logic for timeouts
                if (remoteRssi == -100)
    {
        wifiRemote.State = WiFiState.Error;
        wifiRemote.ErrorColor = Color.Red;
    }
                else
    {
                // Ensure we aren't stuck in Error state if signal returns
        if (wifiRemote.State == WiFiState.Error)
             wifiRemote.State = WiFiState.Good;
    }
}

Example 3: Custom "Neon" Theme

Creating a cyberpunk/neon look manually.

C# - Neon Style
private void ApplyNeonStyle()
{
    wifiBtn.BackColor = Color.Black;
    wifiBtn.ActiveColor = Color.FromArgb(57, 255, 20); // Neon Green
    wifiBtn.InactiveColor = Color.FromArgb(40, 40, 40);
    
                // Ripple matching the neon color
    wifiBtn.RippleColor = Color.FromArgb(100, 57, 255, 20);
    
                // Searching animation style
    wifiBtn.SearchingAnimationStyle = SearchingAnimation.Radar;
    
                // Adjust layout
    wifiBtn.DotSize = 6;
    wifiBtn.SignalSpacing = 60;
    
                // Show gradient for "glowing" effect
    wifiBtn.ShowGradientSignalStrength = true;
}