alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class AttachmentRemovingEventArgs

    Provides information about the attachment-removing event in the SfAIAssistView component.

    Inheritance
    object
    RemovingEventArgs
    AttachmentRemovingEventArgs
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    RemovingEventArgs.Cancel
    RemovingEventArgs.CurrentRequest
    RemovingEventArgs.CustomFormData
    RemovingEventArgs.Event
    RemovingEventArgs.FilesData
    RemovingEventArgs.PostRawFile
    Namespace: Syncfusion.Blazor.InteractiveChat
    Assembly: Syncfusion.Blazor.InteractiveChat.dll
    Syntax
    public class AttachmentRemovingEventArgs : RemovingEventArgs
    Remarks

    This event argument class is used when an attachment is being removed from the AI Assist View component. It inherits all removal-related information from RemovingEventArgs, including file data, custom form data, request details, and cancellation settings.

    Use the Cancel property to prevent the attachment removal operation when specific validation conditions are not met.

    Examples
    <SfAIAssistView>
        <AIAssistViewEvents AttachmentRemoving="OnAttachmentRemoving"></AIAssistViewEvents>
    </SfAIAssistView>
    
    @code {
        private void OnAttachmentRemoving(AttachmentRemovingEventArgs args)
        {
            if (args.FilesData?.Count > 0)
            {
                // Perform custom validation before removal.
                args.Cancel = false;
            }
        }
    }

    Constructors

    AttachmentRemovingEventArgs(RemovingEventArgs)

    Initializes a new instance of the AttachmentRemovingEventArgs class using values from the specified RemovingEventArgs instance.

    Declaration
    public AttachmentRemovingEventArgs(RemovingEventArgs src)
    Parameters
    Type Name Description
    RemovingEventArgs src

    The source RemovingEventArgs instance whose values are copied to the current object. If src is null, default values are assigned where applicable.

    Remarks

    This constructor creates a wrapper around an existing RemovingEventArgs object, allowing attachment-specific event handling within the SfAIAssistView component.

    When src is null, the following defaults are applied:

    • Cancel is set to false.
    • PostRawFile is set to true.
    • Reference-type properties remain null.
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved