📚
Siticone Docs
HomePricing PlansSuggest a FeatureMy LicenseChangelogDownloads
  • Dear Developer!
  • Quick Start Guide
    • Install Siticone UI Library
    • Register for 1 month free trial
    • Register for Premium License
  • Net Framework | Net Core UI
    • Input Controls
      • Siticone TextBox
        • Appearance and Styling
        • Text and Placeholder Config.
        • Input, Validation and Read-Only Behavior
        • User Interaction & Shortcuts
        • System Theme Integration
        • Events and Callbacks
      • Siticone TextArea
        • Always Multiline
        • Custom Font
        • Vertical Scrollbars
        • Border-less Design
        • Dynamic Resizing
        • Margin Spacing
      • Siticone CheckBox
        • Visual Style
        • State Management
        • Interaction Effects
        • Container Layout
        • Container Style
        • Container States
        • State Colors
        • Border Configuration
        • Layout
        • Focus Appearance
        • Text Property
        • Trigger Feedback
      • Siticone RadialButton
        • Appearance
        • Behavior
        • Layout Management
        • User Assistance
        • Animation Timing
        • Events and Callbacks
      • Siticone ToggleButton
        • Toggle Functionality
        • Appearance and Text
        • Border Settings
        • Corner Radius
        • Animation Settings
        • Ripple & Interaction Effects
        • Read-only and Feedback
        • Sizing and Layout
        • Context Menu Integration
        • State Persistence
        • Accessibility
        • Events and Callback
      • Siticone ToggleSwitch
        • Core Toggle Functionality
        • Appearance and Theming
        • Logging and Diagnostics
        • Interactive Effects
        • Labels and Icons
        • Audio Feedback
        • Thumb Customization
        • Animation Settings
        • Context Menu Integration
        • Tool-tip Capabilities
        • Events and Callbacks
      • Siticone UpDown
        • Behavior and Data Config
        • Appearance Customization
        • Feedback and Animation
        • Events and Callbacks
      • Siticone PhoneNumberBox
        • Page 1
        • Phone Number Config
        • Country Flag Display
        • Shadow Effects
        • Input Validation
        • Border and Background
        • Placeholder and Animation
        • Text & Cursor Customization
        • Font and Text Style
        • Corner and Fill Config
        • System Theme (Preview)
        • Public Methods & Text
        • Events and Callbacks
      • Siticone Otp
        • Security & Input Protection
        • Interactive Feedback
        • Input Validation
        • Box Appearance & Layout
        • Data Extraction & Display
        • State Analysis
        • Events and Callbacks
        • Additional Public Methods
    • Buttons and Elements
      • Siticone Button
        • Animation Effects
        • Theme & System Integration
        • User Assist & Interaction
        • Layout & Content
        • Visual Effects & Styling
        • Badge Configuration
        • Manage State & Behavior
        • Performance and Rendering
        • Events for Control Updates
      • Siticone TileButton
        • Animation Effects
        • Color Settings
        • Visual Style
        • Icon Settings
        • Advanced Styling
        • Badge Display
        • Loading Indicator
        • State Management
        • Tool-tip Settings
        • Accessibility
        • Corner Radius
      • Siticone ImageButton
        • Content Presentation
        • Interaction and Behavior
        • Feedback and Animations
        • Visual Style and Layout
        • Badge Features
        • Theme Integration
        • Events and Callbacks
      • Siticone MenuButton
        • Appearance and Visual Style
        • Icon Customization
        • Animation Features
        • Behavior and Interaction
        • Events and Callbacks
      • Siticone CloseButton
        • Appearance Customization
        • Animation and Visual Effects
        • Behavioral Settings
        • Accessibility Features
        • Tool-tip Configuration
        • Countdown Display Config
        • Events and Callbacks
      • Siticone CopyButton
        • Appearance & Visual Effects
        • Corner and Shape Config
        • Behavior & Target Copy
        • Notification Customization
        • Context Menu Customization
        • Accessibility Features
        • Events and Callbacks
      • Siticone DashboardButton
        • Visual Effects
        • Visual Appearance
        • Notification Badge
        • Selection Indicator
        • Layout and Text
        • State Management & Colors
        • Animation Settings
        • Shape Customization
        • Accessibility
        • User Interaction Events
      • Siticone NavBackButton
        • Behavior and Feedback
        • Visual Appearance
        • Dimensions & Icon Styling
        • Animation Effects
        • Visual Style Enhancements
        • Events and Callbacks
      • Siticone NavForwardBtn
        • Behavior & Read-Only Config
        • Icon Customization
        • Colors & Visual Feedback
        • Button Dimensions & Shape
        • Animation Features
        • Visual Style and Effects
        • Events for Animation
        • Control Overrides
        • Events and Callbacks
      • Siticone NotificationBtn
        • Tool-tip Features
        • Layout & Size Customization
        • Bell Appearance & Behavior
        • Badge (Count) Features
        • Interaction and Gesture
        • Visual Effects and Animation
        • Visual Style and Shadow
        • Additional Behavior Settings
        • Events for Feedback
        • Events and Callbacks
      • Siticone PlayPauseBtn
        • Progress Indicator
        • Animation Effects
        • Visual Style
        • Shape Customization
        • Shape Customization
        • Icon Customization
        • Behavior
        • Events and Callbacks
    • Container and Layout
      • Siticone Panel
        • Border Customization
        • Corner Curvature
        • Background Appearance
        • Gradient Effects
        • Interactive Ripple Effects
        • Backdrop Effects
        • Event Notifications
      • Siticone AdvancedPanel
        • Essential Styling
        • Motion and Animation
        • Color and Gradient
        • Depth and Shadow
        • Border Enhancements
        • Interactive States
        • Background Effects
        • Content Management
        • Events and Callback
      • Siticone FlatPanel
        • Appearance and Styling
        • Performance & Rendering
        • Design-Time Integration
      • Siticone FlowPanel
        • Appearance & Visual Effects
        • Layout Customization
        • Performance Optimization
        • Interaction and Behavior
        • Theme & DPI Integration
        • Events and Callbacks
      • Siticone Container
        • Color and Gradients
        • Border Design and Styling
        • Corner and Shape Config
        • Shadow & Elevation Effects
        • Interactive and Animations
        • Badge Configuration
        • Content Management
        • Context Menu Integration
        • Dragging and Interaction
        • Security and Feedback
        • Events and Callbacks
      • Siticone SplitContainer
        • Event Handling
        • Splitter Movement & Behavior
        • Animation & Smooth Drag
        • Appearance and Styling
        • State Management
        • Accessibility & Keyboard Navigation
        • Context Menu Integration
        • System Theme Integration
        • Drag and Drop Panel Reordering
      • Siticone GroupBox
        • Theming and Aesthetics
        • Border & Edge Effects
        • Text & Title Styling
        • Layout Configuration
        • Chevron Styling
        • Badge Config & Animation
        • Collapsible Features
        • Interaction Behavior & Events
        • Status Elements
      • Siticone NativeGroupBox
        • Border Customization
        • Appearance & Layout
      • Siticone DragPanel
        • Layout Customization
        • Appearance Customization
        • Rendering Quality
        • Interactive Behavior
      • Siticone Card
        • Color and Gradients
        • Border Config & Styling
        • Corner and Shape Config
        • Shadow and Elevation
        • Interactive Effects and Animations
        • Hover Effects
        • Visual Effects
        • Badge Configuration
        • Security and Feedback Settings
        • Dynamic Content & Context Menu
        • Drag-and-Drop Interaction
        • Front-Facing Events
      • Siticone TabControl
        • General Layout and Sizing
        • Appearance and Color Customization
        • Close Button Customization
        • Pin Functionality
        • Tab Management and Navigation
        • Animation and Visual Effects
        • Context Menu Customization
        • Events and Callbacks
      • Siticone Workbook (Preview)
    • Progress and Loading
      • Siticone HProgressBar
        • Rounded Corners & Shape Customization
        • Progress Value & Range Management
        • Orientation & Layout
        • Animation & Indeterminate Mode
        • Progress State Colors & Thresholds
        • Gradient & Bar Styling
        • Label & Tooltip Customization
        • Read‑Only Mode
        • Ripple Effects
        • User Experience Enhancements
        • System Theme Tracking
        • Events and Callbacks
      • Siticone VProgressBar
        • Appearance & Styling
        • Behavior, Animation & Interaction
        • System Integration & Events
      • Siticone HBarsProgress
        • Animation Control
        • Progress Value Management
        • Appearance and Styling
        • Display and Interaction
        • Events and Callbacks
      • Siticone VBarsProgress
        • Animation Features
        • Progress and Range Settings
        • Line Configuration
        • Color and Appearance
        • Display Options
        • User Interaction
        • Events and Callbacks
      • Siticone HLineProgress
        • Range Settings
        • Animation Settings
        • Color and Gradient Design
        • Visual Effects
        • Pulse Animation Settings
        • Corner Radius Customization
        • Page
      • Siticone VLineProgress
        • Range Settings
        • Animation Settings
        • Color and Gradient Customization
        • Background and Highlight Effects
        • Pulse Animation Settings
        • Corner Radius Settings
      • Siticone CircularSpinner
        • Visual Customization
        • Geometry and Layout
        • Motion and Animation
        • Progress Indication
        • Events
      • Siticone LoadingSpinner
        • General Control Methods & Events
        • Animation Settings
        • Appearance & Visual Customization
        • Progress Display Customization
        • Size & Radius Customization
        • Ring & Spoke Customization
        • Special Effects
        • Events and Callbacks
      • Siticone RadialProgress
        • Core Configuration
        • Visual Styling
        • Interaction and Control
        • Animation and Motion
        • Advanced Effects & Readonly State
        • Color Customization
        • Indeterminate Mode
        • Events
      • Siticone SmoothCSpinner
        • Appearance Customization
        • Animation Control
        • Arc Dimension Settings
      • Siticone SmoothLProgress
        • Dual-Bar Behavior
        • Visual Appearance
        • Motion Dynamics
        • Animation Control
    • Sliders and Range
      • Siticone HSlider
        • Appearance and Layout
        • Read-Only Customization
        • Visual Effects & Animations
        • Interaction & Behavior
        • Data Binding & State Management
        • Events & Accessibility
        • Built-In Context Menu Operations
      • Siticone VSlider
        • Data & Value Management
        • Appearance Customization
        • Read-Only Mode Appearance
        • Visual Effects & Animations
        • Interaction & Feedback Settings
        • Events & Event Handling
        • State Management
        • Accessibility & Data Binding Support
      • Siticone HTrackBar
        • Data & Value Management
        • Appearance Customization
        • Animation & Interaction Effects
        • Behavior & Interaction
        • Accessibility & Data Binding
        • Events
      • Siticone VTrackBar
        • Value and Range Configuration
        • Appearance Customization
        • Animation and Interaction Customization
        • Feedback Mechanisms
        • Context Menu and Tooltip Features
        • Accessibility and Keyboard Support
        • State Management and Data Binding
        • Events
      • Siticone HRangeSlider
        • Behavior & Value Management
        • Appearance Customization
        • User Interaction
        • Events
      • Siticone HRangeTrackBar
        • Behavior Settings
        • Appearance Settings
        • Event Handling
        • Built-In Context Menu Functionality
        • Keyboard and Mouse Interaction
    • Data Display and Grid
      • Siticone DataGrid
        • Data Management & Binding
        • Theming and Appearance Customization
        • Behavior & Interaction
        • Built-In Data Import/Export and Encryption
        • Search and Filtering Capabilities
        • Text Formatting and Cell Styling (Ribbon Toolbar)
        • User Interaction Enhancements
        • Events and Callbacks
      • Siticone Label
        • Text and Content
        • Transparent Background
        • Layout & Rendering Enhancements
        • Standard Layout Properties (Inherited)
      • Siticone LinkedLabel
        • Text and Link Behavior
        • Color Properties
        • Font and Appearance
        • Events
      • Siticone ShimmerLabel
        • Shimmer Appearance
        • Shimmer Behavior
        • Shimmer Text
    • Form Design Framework
      • Siticone Form
        • Window Behavior & Layout
        • Title Bar Customization
        • Control Box (Window Buttons) Customization
        • Theme and Appearance
        • Animation & Visual Effects
        • Events and Public Methods
      • Siticone EmptyForm
        • Visual Appearance & Styling
        • Rendering and Performance Enhancements
      • Siticone DragForm
        • Drag Functionality
        • Accessibility and Keyboard Navigation
        • Performance Optimizations
        • Appearance Customization
    • Gauges and Measurement
      • Siticone GaugeClock
        • Value Hand Customization
        • Core Appearance & Theme
        • Typography & Labeling
        • Gauge Configuration & Value Range
        • 3D Effects and Metallic Appearance
        • Visual Effects and Enhancements
        • Gradient Customization
        • Display & Format Options
        • Scale and Tick Mark Configuration
        • Animation & Interaction
        • Export/Import and Context Menu Options
        • Section Management
        • Events and Callbacks
      • Siticone GaugeDigital
        • Gauge Core Settings
        • LED Display Settings
        • Visual Style and Themes
        • 3D Effects
        • Lighting Effects
        • Typography and Scale
        • Custom Gradients and Texture
        • Animation and Interactivity
        • Context Menu Operations
        • Events
      • Siticone GaugeNumeric
        • Gauge Display & Value
        • Scale and Markers
        • Typography & Text
        • Color Customization
        • 3D and Special Effects
        • Interaction & Tool-tip
        • Additional Features & Events
      • Siticone GaugeZone
        • ZonePasswordForm (Password Dialog Control)
        • Control Features
    • Chip and Group Controls
      • Siticone Chip
        • Appearance & Color Scheme
        • Corner and Shape Customization
        • Visual Effects
        • Interaction & Behavior
        • Close Button Customization
        • Selection Indicator Customization
        • Visual Content
        • Events
      • Siticone GroupChip
        • Group Management
        • Visual Effects
        • State Colors
        • Close Button Styling & Layout
        • Selection Indicator
        • Visual Elements
        • Color Scheme
        • Border Customization
        • Corner Customization
        • Interactive Features
        • Animation Settings
        • Behavior
        • Events
      • Siticone GroupChipPanel
        • Drag-and-Drop Customization
        • Chip Selection Customization
        • Chip Management API
        • Chip Events
      • Siticone GroupButton
        • Material Design Effects
        • Surface Styling
        • Screen Reader Support
        • Alert System (Badge Features)
        • Selection and Interactive States
        • Selection Markers and Indicator Customization
        • Content Layout
        • Animation and Motion
        • Corner and Shape Customization
        • Events and Callbacks
    • Media and Graphics
      • Siticone Audio
        • Basic Behavior and State
        • Appearance Customization
        • Sound Wave Animation and Style
        • Visual Effects and Animations
        • Events and Callbacks
      • Siticone PictureBox
        • Image Loading and Display
        • Layout and Sizing
        • Shape and Border Config
        • Image Quality and Effects
        • Image Transformations
        • Slideshow Functionality
        • Interaction & Behavior
        • Performance & Display
      • Signature Pad
        • Context Menu Customization
        • Template Customization
        • Animation Features
        • Stroke Aesthetics and Dynamics
        • Input Processing and Guides
        • Visual Guides
        • Rendering Quality
        • Performance
        • User Experience
        • Public Methods for Signature Handling
        • Public Events for Integration
        • Events
    • Separator Controls
      • Siticone HSeparator
        • Segment Configuration
        • Line Multiplication
        • Visual Styling
      • Siticone VSeparator
        • Segment Configuration
        • Line Multiplication
        • Visual Styling
        • Enumerations
    • Utility Controls
      • Siticone BackgroundWkr
        • Worker Initialization and Configuration
        • Custom Progress Reporting Functionality
      • Siticone SystemInfo
        • System and Service Information
        • Security and User Information
        • Performance and Memory Metrics
        • System Hardware and Operating System Details
        • Peripherals and Additional Devices
        • Hardware (Detailed)
        • Display Details
        • Network Information
        • Configuration Options
        • Methods for Data Retrieval and Export
        • Events and Callbacks
      • Siticone TaskbarBadgeS.
        • Badge Display & Formatting
        • Animation Effects
        • Notification Effects
        • Flash / Highlight Effects
        • System Theme Integration
        • Parent Form Integration
        • Events and Callbacks
      • Siticone ThemeSwitcher
        • Layout and Spacing
        • Visual Effects and Animation
        • Icon Customization
        • Border and Corner Configuration
        • Color Scheme
        • Behavior and State
        • Accessibility
      • Siticone ThemeTracker
        • Theme and Accent Information
        • Theme Application and Automation
        • Theme & Accent Events
        • Initialization
      • Siticone IdGen
        • Unique ID Customization
        • Character Set Customization
        • ID Generation Strategy and Distribution Settings
        • ID Generation and Collision Handling
    • Data Formatting and Display
      • Siticone Humanizer Date..
        • Data Management
        • Formatting Settings
        • Calculation Options
        • Custom Translations
      • Siticone HumanizerDec..
        • Input Value Configuration
        • Automatic Humanized Output
        • Customizable Humanization
      • Siticone HumanizerFloat
        • Formatting Features
        • Validation Features
        • Currency Features
        • Localization Features
        • Value and Precision Features
        • Read-Only Display Features
        • Additional Public Methods
        • Enumerations (for Customization)
      • Siticone HumanizerInt
        • Core Number Conversion
        • Text Customization and Styling Options
        • Number Scale & Localization
        • Currency Features
        • Performance and Asynchronous Processing
        • Caching Mechanism and Management
        • Settings Change Notifications
      • Siticone HumanizerLong
        • Core Number Conversion
        • Formatting and Localization Options
        • Security and Data Integrity
        • Performance and Caching
        • Events for Developer Integration
    • Special Purpose Controls
      • Siticone CardNumber
        • Appearance Customization
        • Credit Card Specific Features
        • Input and Validation
        • Read-Only Customization
        • Shadow & Animation Effects
        • Selection and Text Editing
        • Context Menu Support
        • Credit Card Events
      • Siticone CopyUrl
        • URL Display and Core Functionality
        • Icon Management
        • Copy Button Customization
        • Text Styling
        • Background & Border Styling
        • Corner Styling
        • Animation Effects
        • Interaction Behavior
        • Notification System
        • Additional Built-In Features
      • Siticone Rating
        • Rating Functionality
        • Appearance Customization
        • Layout and Sizing Customization
        • Behavior Customization
        • Animation Customization
        • Focus and Accessibility Customization
        • Right‑Click Context Menu Customization
      • Siticone RatingEmoji
        • Theme Management
        • Emoji Customization
        • Visual Enhancement
        • Selection and Rating
        • Animation and Interaction Dynamics
        • User Feedback
        • Data Persistence
Powered by GitBook
On this page
  • Overview
  • 2.1 Toggle Functionality
  • 2.2 Ripple Effect
  • 2.3 Long Press Detection
  • 2.4 Interactive Feedback
  • 2.5 Shaking Animation
  • Review and Summary
  • Additional Sections
  1. Net Framework | Net Core UI
  2. Input Controls
  3. Siticone RadialButton

Behavior

Control how the SiticoneRadialButton responds to user interactions, enabling dynamic and interactive functionalities such as toggling states, ripple animations, long-press detection, shaking, etc.

Overview

The Behavior feature of the SiticoneRadialButton control encompasses all properties, events, and methods that dictate how the button interacts with user inputs and responds with dynamic visual feedback. This includes toggle functionality for binary operations, ripple effects for interactive feedback, long-press detection for extended interactions, shaking animations for error indications, and particle effects for enhanced visual appeal. By leveraging these behavioral properties, developers can create buttons that not only perform actions but also provide intuitive and engaging user experiences.


2.1 Toggle Functionality

Toggle functionality allows the button to maintain an on/off state, useful for binary operations or mode switches.

Properties

Property
Description
Default Value

IsToggleButton

Enables toggle functionality, allowing the button to maintain an on/off state. Useful for binary operations or mode switches.

false

IsToggled

Gets or sets the current toggle state of the button. This property is meaningful only when IsToggleButton is true.

false

Events

Event
Description

ToggleChanged

Occurs when the toggle state of the button changes. Allows developers to respond to state changes.

Methods

Method
Description

PerformClick()

Simulates a click on the button, triggering the Click event and associated behaviors.

Key Points to Note

Point
Description

Toggle State Management

Ensure IsToggleButton is set to true to enable toggling. The IsToggled property reflects the current state and should be managed accordingly.

State Synchronization

When IsToggled changes programmatically, ensure UI updates and event handlers respond appropriately to maintain consistency.

Accessibility

Provide clear visual indicators for toggled states to support users in understanding the button's current state.

Code Example

// Enabling toggle functionality on the radial button
SiticoneRadialButton radialButton = new SiticoneRadialButton
{
    Text = "Power",
    IsToggleButton = true,
    BaseColor = Color.Green,
    HoverColor = Color.LightGreen,
    PressedColor = Color.DarkGreen,
    TextColor = Color.White
};

// Subscribing to the ToggleChanged event
radialButton.ToggleChanged += (sender, e) =>
{
    if (radialButton.IsToggled)
    {
        // Perform actions when toggled on
        Console.WriteLine("Power is ON");
    }
    else
    {
        // Perform actions when toggled off
        Console.WriteLine("Power is OFF");
    }
};

Best Practices

Best Practice
Description

Clear State Indicators

Use distinct colors or visual cues to clearly differentiate between the toggled and untoggled states, enhancing user understanding and interaction.

Consistent Behavior

Ensure that toggling behavior is consistent across similar buttons within the application to maintain a cohesive user experience.

Event Handling

Appropriately handle the ToggleChanged event to perform necessary actions in response to state changes, such as updating related UI elements or triggering business logic.

Accessibility Compliance

Provide accessible descriptions and state information for assistive technologies to ensure all users can understand and interact with the toggle functionality effectively.

Common Pitfalls and Design Considerations

Pitfall
Description

Forgetting to Enable Toggle

Not setting IsToggleButton to true will prevent the button from maintaining an on/off state, rendering toggle functionality ineffective.

State Inconsistencies

Programmatically changing IsToggled without proper event handling can lead to inconsistencies between the UI and the underlying state logic.

Overcomplicating States

Introducing too many toggle states or complex state logic can confuse users. Keep toggle functionality binary and straightforward for clarity.

Neglecting Visual Feedback

Failing to provide adequate visual feedback for toggle states can reduce the intuitiveness of the control, making it harder for users to discern the current state.


2.2 Ripple Effect

Ripple effects provide interactive visual feedback, creating a fluid and engaging user experience upon button clicks.

Properties

Property
Description
Default Value

EnableRippleEffect

Toggles the Material Design-inspired ripple animation effect when clicking the button. Creates a fluid, interactive user experience.

false

RippleColor

Defines the color of the ripple animation effect. Should provide visible contrast against the button's background.

Color.FromArgb(255, 200, 200, 200)

RippleOpacity

Controls the transparency of the ripple effect. Values range from 0.0 (fully transparent) to 1.0 (fully opaque).

0.7f

RippleRadiusMultiplier

Controls the maximum size of the ripple effect relative to the button's diagonal. Values greater than 1.0 create larger ripples.

1.0f

Events

Event
Description

AnimationEffectStarted

Occurs when a ripple animation effect starts, allowing developers to respond to the initiation of the effect.

Methods

No specific methods are associated with the ripple effect beyond property configurations.

Key Points to Note

Point
Description

Enabling Ripples

Set EnableRippleEffect to true to activate ripple animations.

Color Contrast

Choose RippleColor that contrasts well with the BaseColor to ensure the ripple effect is noticeable and visually appealing.

Radius Control

Adjust RippleRadiusMultiplier to control the size of the ripple effect. A higher multiplier results in larger ripples, which can convey different levels of interaction intensity.

Opacity Settings

Fine-tune RippleOpacity to balance the visibility of the ripple effect without overwhelming the button's primary content.

Code Example

// Configuring ripple effect properties
SiticoneRadialButton radialButton = new SiticoneRadialButton
{
    Text = "Click Me",
    EnableRippleEffect = true,
    RippleColor = Color.FromArgb(100, Color.White),
    RippleOpacity = 0.8f,
    RippleRadiusMultiplier = 1.2f,
    BaseColor = Color.Blue,
    HoverColor = Color.LightBlue,
    PressedColor = Color.DarkBlue,
    TextColor = Color.White
};

// Subscribing to the AnimationEffectStarted event
radialButton.AnimationEffectStarted += (sender, e) =>
{
    Console.WriteLine("Ripple effect started at location: " + e.Location);
};

Best Practices

Best Practice
Description

Appropriate Color Choice

Select RippleColor that complements the button's BaseColor and ensures visibility without clashing with other UI elements.

Balanced Opacity

Adjust RippleOpacity to make the ripple visible yet subtle, preventing it from overshadowing the button's text or image.

Consistent Radius

Use a consistent RippleRadiusMultiplier across similar buttons to maintain uniformity in interactive feedback throughout the application.

Performance Optimization

Enable ripples judiciously, especially on buttons that are frequently interacted with, to balance visual appeal with application performance.

Common Pitfalls and Design Considerations

Pitfall
Description

Overly Prominent Ripples

Setting RippleRadiusMultiplier too high can make ripples excessively large, distracting users and potentially overlapping other UI elements.

Low Contrast Ripples

Using RippleColor with low contrast against the BaseColor can render ripples invisible or hard to discern, reducing the effectiveness of the feedback.

Performance Issues

Enabling ripple effects on numerous buttons simultaneously can lead to performance degradation, especially on devices with limited graphics capabilities.

Inconsistent Effects

Applying different ripple configurations across similar buttons can create a disjointed user experience, undermining the application's cohesiveness.


2.3 Long Press Detection

Long press detection enables the button to recognize extended presses, triggering specific actions after a set duration.

Properties

Property
Description
Default Value

EnableLongPress

Enables the detection of long press interactions on the button.

false

LongPressDurationMS

Sets the duration (in milliseconds) required to recognize a long press. Controls when the LongPressed event is triggered.

1000

Events

Event
Description

LongPressed

Occurs when the button has been pressed and held for the duration specified by LongPressDurationMS.

Methods

No specific methods are associated with long press detection beyond property configurations.

Key Points to Note

Point
Description

Enabling Long Press

Set EnableLongPress to true to activate long press detection.

Duration Control

Adjust LongPressDurationMS to define how long a press must be held to trigger the LongPressed event.

Event Handling

Implement handlers for the LongPressed event to perform actions such as displaying additional options, showing tooltips, or triggering specific functionalities.

Code Example

// Configuring long press detection
SiticoneRadialButton radialButton = new SiticoneRadialButton
{
    Text = "Hold Me",
    EnableLongPress = true,
    LongPressDurationMS = 1500, // 1.5 seconds
    BaseColor = Color.Purple,
    HoverColor = Color.MediumPurple,
    PressedColor = Color.DarkMagenta,
    TextColor = Color.White
};

// Subscribing to the LongPressed event
radialButton.LongPressed += (sender, e) =>
{
    MessageBox.Show("Long press detected!");
};

Best Practices

Best Practice
Description

Appropriate Duration

Set LongPressDurationMS to a value that balances responsiveness with intentionality, preventing accidental long press detections.

User Feedback

Provide immediate and clear feedback when a long press is detected, such as visual indicators or haptic feedback, to confirm the action to the user.

Avoid Conflict with Clicks

Ensure that long press detection does not interfere with regular click interactions, maintaining distinct and clear response behaviors.

Accessibility Considerations

Accommodate users who may require longer durations for interactions by allowing customization of LongPressDurationMS based on accessibility needs.

Common Pitfalls and Design Considerations

Pitfall
Description

Too Short Duration

Setting LongPressDurationMS too low can result in unintended LongPressed events during regular quick clicks, leading to confusion.

Too Long Duration

Conversely, setting the duration too high may make the long press feel unresponsive or frustrating, especially for users accustomed to quicker interactions.

Overlapping Events

Failing to properly manage the interplay between click and long press events can lead to unexpected behaviors, such as both events firing simultaneously.

Lack of Feedback

Not providing adequate feedback upon long press detection can leave users uncertain whether their action was recognized, diminishing the interactive experience.


2.4 Interactive Feedback

Interactive feedback enhances user engagement by providing responsive visual and auditory cues based on user interactions.

Properties

Property
Description
Default Value

CanShake

Enables the button shake animation when clicked in read-only mode. Provides visual feedback for non-interactive states.

true

CanBeep

Enables system beep sound when clicked in read-only mode. Adds auditory feedback for non-interactive states.

true

Events

Event
Description

ReadOnlyInteraction

Occurs when the button is interacted with while in read-only mode, allowing developers to handle or override default behaviors.

Methods

Method
Description

StartShaking()

Initiates the shake animation, providing visual feedback for non-interactive states or errors.

StopShaking()

Stops the shake animation, returning the button to its normal state.

Key Points to Note

Point
Description

Shake Feedback

CanShake provides a visual shake effect, which can be useful for indicating errors or attracting attention to the button without enabling interaction.

Auditory Feedback

CanBeep adds an auditory cue when the button is clicked in read-only mode, enhancing feedback for users, especially those relying on auditory signals.

Read-Only Mode Integration

Interactive feedback features like shaking and beeping are particularly useful in read-only mode to inform users that the button is non-interactive while maintaining visibility.

Code Example

// Configuring interactive feedback properties
SiticoneRadialButton radialButton = new SiticoneRadialButton
{
    Text = "Submit",
    IsReadOnly = true,
    CanShake = true,
    CanBeep = true,
    BaseColor = Color.Gray,
    TextColor = Color.DarkGray
};

// Subscribing to the ReadOnlyInteraction event
radialButton.ReadOnlyInteraction += (sender, e) =>
{
    if (!e.WasHandled)
    {
        // Trigger shake animation and beep sound
        radialButton.StartShaking();
        if (radialButton.CanBeep)
        {
            System.Media.SystemSounds.Beep.Play();
        }
    }
};

Best Practices

Best Practice
Description

Purposeful Feedback

Use shaking and beeping judiciously to indicate specific states or errors, avoiding overuse that may lead to user annoyance or desensitization.

Consistent Feedback

Maintain consistency in feedback mechanisms across similar controls to ensure a uniform user experience.

Accessibility Considerations

Incorporate both visual and auditory feedback to accommodate users with different sensory preferences and needs, enhancing overall accessibility.

Responsive Animations

Ensure that shake animations are smooth and not overly disruptive, providing clear yet subtle feedback to users.

Common Pitfalls and Design Considerations

Pitfall
Description

Excessive Shaking

Overusing the shake animation can lead to user frustration and diminish its effectiveness as a feedback mechanism.

Auditory Overload

Triggering beeps too frequently or using loud sounds can become annoying to users, detracting from the overall user experience.

Ignoring User Preferences

Not providing options to customize or disable auditory feedback can alienate users who prefer silent interactions or have hearing impairments.

Performance Impact

Intensive animations like shaking can affect application performance, especially if multiple buttons are animated simultaneously.


2.5 Shaking Animation

Shaking animations provide a visual cue, often used to indicate errors or to draw attention to specific buttons.

Properties

Property
Description
Default Value

ShakeDuration

Sets the duration of the shake animation in milliseconds. Longer durations create more noticeable shake effects.

500

ShakeIntensity

Controls the magnitude of the shake animation on a scale of 1-10. Higher values create more pronounced shaking.

5

Events

Event
Description

AnimationCompleted

Occurs when an animation effect, such as shaking, has completed. Allows developers to perform actions post-animation.

Methods

Method
Description

StartShaking()

Initiates the shake animation, providing visual feedback for non-interactive states or errors.

StopShaking()

Stops the shake animation, returning the button to its normal state.

Key Points to Note

Point
Description

Shake Configuration

Adjust ShakeDuration and ShakeIntensity to control the duration and intensity of the shake effect, tailoring it to the specific feedback needs.

Triggering Shakes

Shakes are typically triggered in response to certain events, such as failed validations or to draw attention to important actions that require user focus.

Animation Management

Ensure that shake animations are properly started and stopped to prevent lingering animations that could disrupt the user experience.

Code Example

// Configuring shaking animation properties
SiticoneRadialButton radialButton = new SiticoneRadialButton
{
    Text = "Delete",
    IsReadOnly = true,
    CanShake = true,
    CanBeep = true,
    ShakeDuration = 700,      // 700 milliseconds
    ShakeIntensity = 7,       // Intensity level 7
    BaseColor = Color.DarkRed,
    TextColor = Color.White
};

// Subscribing to the ReadOnlyInteraction event to trigger shaking
radialButton.ReadOnlyInteraction += (sender, e) =>
{
    if (!e.WasHandled)
    {
        radialButton.StartShaking();
        if (radialButton.CanBeep)
        {
            System.Media.SystemSounds.Beep.Play();
        }
    }
};

// Subscribing to the AnimationCompleted event
radialButton.AnimationCompleted += (sender, e) =>
{
    if (e.AnimationType == AnimationType.Shake)
    {
        Console.WriteLine("Shake animation completed.");
    }
};

Best Practices

Best Practice
Description

Appropriate Intensity

Set ShakeIntensity to a level that effectively conveys the intended feedback without being overly jarring or distracting.

Controlled Duration

Adjust ShakeDuration to ensure that the animation is long enough to be noticeable but short enough to maintain smooth user interactions.

Feedback Integration

Combine shaking with other feedback mechanisms, such as auditory cues or color changes, to reinforce the feedback provided to the user.

User Experience Focus

Ensure that shake animations enhance the user experience by providing clear and meaningful feedback rather than serving as mere decorative effects.

Common Pitfalls and Design Considerations

Pitfall
Description

Overly Intense Shakes

High ShakeIntensity values can create a disruptive experience, making the application feel unresponsive or overly animated.

Long Shake Durations

Excessively long ShakeDuration can lead to user frustration and interrupt the flow of interactions within the application.

Unmanaged Animation States

Failing to properly manage the start and stop of shake animations can result in animations that persist indefinitely or interfere with other UI elements.

Neglecting Accessibility

Not considering users with motion sensitivities may cause discomfort. Provide options to disable or customize shake animations based on user preferences.


Review and Summary

The Behavior feature of the SiticoneRadialButton control offers a comprehensive suite of properties, events, and methods that define how the button interacts with user inputs and provides dynamic feedback. This includes toggle functionality for maintaining on/off states, ripple effects for engaging interactions, long press detection for extended user actions, and interactive feedback mechanisms like shaking animations and particle effects.

Key Considerations:

  • Interactivity Enhancement: Utilize behavioral properties to create intuitive and responsive buttons that provide clear feedback, enhancing overall user engagement.

  • Customization Balance: Balance the extent of behavioral customizations with application performance and user experience, ensuring that visual and interactive effects complement rather than hinder functionality.

  • Consistency and Accessibility: Maintain consistent behavior across similar buttons and prioritize accessibility by providing clear visual and auditory feedback that accommodates all users.

  • Performance Optimization: Be mindful of the performance impact of animations and effects, optimizing configurations to maintain smooth and responsive interactions even with multiple buttons active.

By strategically leveraging the Behavior features and adhering to best practices, developers can create buttons that not only perform essential actions but also enrich the user experience through engaging and meaningful interactions.


Additional Sections

Customization Examples

Example 1: Toggle Button with Ripple and Shake Effects

This example demonstrates a toggle button that utilizes ripple animations and shaking feedback to enhance interactivity and user experience.

// Creating a toggle SiticoneRadialButton with ripple and shake effects
SiticoneRadialButton radialButton = new SiticoneRadialButton
{
    Text = "Enable Feature",
    IsToggleButton = true,
    IsToggled = false,
    EnableRippleEffect = true,
    RippleColor = Color.FromArgb(100, Color.White),
    RippleOpacity = 0.5f,
    RippleRadiusMultiplier = 1.5f,
    CanShake = true,
    CanBeep = true,
    ShakeDuration = 600,      // 600 milliseconds
    ShakeIntensity = 6,       // Intensity level 6
    BaseColor = Color.Teal,
    HoverColor = Color.LightSeaGreen,
    PressedColor = Color.DarkCyan,
    TextColor = Color.White,
    Font = new Font("Segoe UI", 10f, FontStyle.Regular)
};

// Subscribing to the ToggleChanged event
radialButton.ToggleChanged += (sender, e) =>
{
    if (radialButton.IsToggled)
    {
        // Actions when toggled on
        Console.WriteLine("Feature Enabled");
    }
    else
    {
        // Actions when toggled off
        Console.WriteLine("Feature Disabled");
    }
};

Example 2: Button with Long Press Detection and Particle Effects

This example showcases a button that detects long presses and emits particle effects, providing both extended interaction capabilities and enhanced visual feedback.

// Configuring a SiticoneRadialButton with long press detection and particle effects
SiticoneRadialButton radialButton = new SiticoneRadialButton
{
    Text = "Hold to Save",
    EnableLongPress = true,
    LongPressDurationMS = 2000, // 2 seconds
    UseParticles = true,
    ParticleCount = 30,
    ParticleColor = Color.FromArgb(255, 0, 255, 0), // Green particles
    BaseColor = Color.DarkOrange,
    HoverColor = Color.Orange,
    PressedColor = Color.OrangeRed,
    TextColor = Color.White,
    Font = new Font("Segoe UI", 10f, FontStyle.Bold)
};

// Subscribing to the LongPressed event
radialButton.LongPressed += (sender, e) =>
{
    MessageBox.Show("Data Saved Successfully!");
};

FAQs

Question

Answer

Q1: How do I enable toggle functionality on the button?

A1: Set the IsToggleButton property to true. You can then manage the toggle state using the IsToggled property.

Q2: Can I customize the duration required for a long press?

A2: Yes, adjust the LongPressDurationMS property to set the desired duration (in milliseconds) for a long press to be recognized.

Q3: How can I add a ripple effect to the button?

A3: Set the EnableRippleEffect property to true and configure RippleColor, RippleOpacity, and RippleRadiusMultiplier to customize the ripple appearance.

Q4: What happens if I set both CanShake and CanBeep to false?

A4: The button will not provide shaking or beep feedback when interacted with in read-only mode. Ensure that some form of feedback is provided to inform users of the button's state.

Q5: How do I subscribe to the AnimationCompleted event for shake animations?

A5: Implement an event handler for AnimationCompleted and check if the AnimationType is Shake within the handler to perform specific actions after the shake animation completes.

Q6: Is it possible to disable the ripple effect for specific interactions?

A6: Currently, the ripple effect can be toggled on or off globally using the EnableRippleEffect property. To disable it for specific interactions, implement conditional logic within your event handlers to manage ripple behavior.

Q7: How do I stop the shake animation programmatically?

A7: Invoke the StopShaking() method on the button instance to cease the shake animation.

Troubleshooting

Issue

Solution

Toggle State Not Updating Correctly

- Ensure that IsToggleButton is set to true.- Verify that event handlers for ToggleChanged are correctly implemented to respond to state changes.- Check for conflicting logic that may reset IsToggled inadvertently.

Ripple Effect Not Visible

- Confirm that EnableRippleEffect is set to true.- Ensure that RippleColor contrasts with the button's BaseColor.- Verify that RippleOpacity is set to a value greater than 0.0.

Long Press Event Not Triggering

- Ensure that EnableLongPress is set to true.- Verify that the press duration meets or exceeds LongPressDurationMS.- Check that no other event handlers are preventing the LongPressed event from firing.

Shake Animation Continues Indefinitely

- Confirm that StopShaking() is called appropriately.- Ensure that CanShake is not being re-enabled unintentionally within event handlers or other logic.

Particle Effects Causing Performance Lag

- Reduce ParticleCount to a lower value.- Optimize the ParticleColor to use less intensive colors.- Disable UseParticles on less critical buttons to conserve resources.

Beep Sound Not Playing on Read-Only Interaction

- Ensure that CanBeep is set to true.- Verify that the system sound settings allow beep sounds.- Check that no exceptions are being thrown when attempting to play the beep sound.

Read-Only Interaction Not Providing Feedback

- Confirm that IsReadOnly is set to true.- Ensure that CanShake and CanBeep are configured as desired.- Verify that event handlers for ReadOnlyInteraction are correctly implemented.

PreviousAppearanceNextLayout Management

Last updated 4 months ago