menu

Blazor

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

    Show / Hide Table of Contents

    Class PaletteSelectionChangedEventArgs

    Notifies when the selection objects change in the symbol palette.

    Inheritance
    System.Object
    PaletteSelectionChangedEventArgs
    Namespace: Syncfusion.Blazor.Diagram.SymbolPalette
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class PaletteSelectionChangedEventArgs : Object
    Remarks

    Triggered when users select or deselect symbols, providing access to previous and current selection states.

    Examples
    <SfSymbolPaletteComponent Palettes="@Palettes" SelectionChanged="PaletteSelectionChange">
    </SfSymbolPaletteComponent>
    
    private void PaletteSelectionChange(PaletteSelectionChangedEventArgs args)
    {
        string oldID = args.OldValue;
        string newID = args.NewValue;
    }

    Constructors

    PaletteSelectionChangedEventArgs()

    Declaration
    public PaletteSelectionChangedEventArgs()

    Properties

    NewValue

    Gets the ID of the currently selected palette item.

    Declaration
    public string NewValue { get; }
    Property Value
    Type Description
    System.String

    A string representing the ID of the newly selected item, or null if no item is currently selected.

    Examples
    <SfSymbolPaletteComponent Palettes="@Palettes" SelectionChanged="PaletteSelectionChange">
    </SfSymbolPaletteComponent>
    
    private void PaletteSelectionChange(PaletteSelectionChangedEventArgs args)
    {
        string newID = args.NewValue;
        if (!string.IsNullOrEmpty(newID))
        {
            // Handle new selection
        }
    }

    OldValue

    Gets the ID of the previously selected palette item.

    Declaration
    public string OldValue { get; }
    Property Value
    Type Description
    System.String

    A string representing the ID of the old selected item, or null if no item was previously selected.

    Examples
    <SfSymbolPaletteComponent Palettes="@Palettes" SelectionChanged="PaletteSelectionChange">
    </SfSymbolPaletteComponent>
    
    private void PaletteSelectionChange(PaletteSelectionChangedEventArgs args)
    {
        string oldID = args.OldValue;
        if (!string.IsNullOrEmpty(oldID))
        {
            // Handle previous selection
        }
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved