menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SpeedDialBeforeOpenCloseEventArgs - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SpeedDialBeforeOpenCloseEventArgs

    Provides information about the Opening and Closing event callbacks, allowing optional cancellation of the opening or closing action.

    Inheritance
    System.Object
    SpeedDialBeforeOpenCloseEventArgs
    Namespace: Syncfusion.Blazor.Buttons
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SpeedDialBeforeOpenCloseEventArgs : Object
    Remarks

    This event argument is used in pre-open and pre-close scenarios for the SfSpeedDial component, allowing you to intercept, modify, or prevent the open/close action.

    Examples

    This example demonstrates how to prevent the opening of a SpeedDial:

    <SfSpeedDial Opening="OnSpeedDialOpening">
    </SfSpeedDial>
    
    @code {
        private void OnSpeedDialOpening(SpeedDialBeforeOpenCloseEventArgs args)
        {
            // Conditionally prevent opening
            if (SomeCondition)
            {
                args.Cancel = true;
            }
        }
    }

    Constructors

    SpeedDialBeforeOpenCloseEventArgs()

    Declaration
    public SpeedDialBeforeOpenCloseEventArgs()

    Properties

    Cancel

    Gets or sets a value indicating whether to cancel the open or close action of the SpeedDial component.

    Declaration
    public bool Cancel { get; set; }
    Property Value
    Type Description
    System.Boolean

    A bool value; set to true to cancel the open or close operation, preventing the speed dial from opening or closing. Otherwise, false.

    Remarks

    Speed dial displays a list of action buttons on click, and the list is closed when a speed dial item is clicked. This property enables you to programmatically control the open/close lifecycle.

    Examples

    Preventing the closing of SpeedDial when a condition is met:

    void OnClosing(SpeedDialBeforeOpenCloseEventArgs args)
    {
        if (needToBlock)
        {
            args.Cancel = true;
        }
    }

    Element

    Gets the reference to the popup element of the SfSpeedDial.

    Declaration
    public ElementReference Element { get; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.ElementReference

    An Microsoft.AspNetCore.Components.ElementReference representing the popup element of the SpeedDial.

    Remarks

    You can use this property to access or manipulate the popup element directly if required, for advanced DOM customizations or manipulation.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved