menu

Blazor

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

    Show / Hide Table of Contents

    Class SymbolPaletteTemplates

    Represents a segment of UI content, implemented as a delegate that writes the content of a Node.

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

    This template allows customization of how nodes are rendered within the symbol palette component. The context parameter provides access to the Node object for data binding and event handling.

    Examples
    <SfSymbolPaletteComponent Height="600px">
    <SymbolPaletteTemplates>
     <NodeTemplate>
      @{ var id = (context as Node).ID;
     <div style="height: 100%; width: 100%; background:green">
      <input type="button" value="Button1" @onclick="@OnClick" />
      </div>
      }
     </NodeTemplate>
     </SymbolPaletteTemplates>
    </SfSymbolPaletteComponent >

    Constructors

    SymbolPaletteTemplates()

    Declaration
    public SymbolPaletteTemplates()

    Properties

    ChildContent

    Represents a segment of UI content, implemented.

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    The UI content segment that defines the visual representation.

    Remarks

    This property allows customization of the UI rendering through delegate implementation.

    NodeTemplate

    A NodeTemplate represents a segment of the UI to be rendered for a Node.

    Declaration
    public RenderFragment<Node> NodeTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment<Node>

    The template content used to customize the visual representation of nodes in the symbol palette.

    Remarks

    This template allows custom rendering of nodes with access to the Node context for data binding and event handling.

    Examples
    <SfSymbolPaletteComponent Height="600px">
    <SymbolPaletteTemplates>
     <NodeTemplate>
      @{ var id = (context as Node).ID;
     <div style="height: 100%; width: 100%; background:green">
      <input type="button" value="Button1" @onclick="@OnClick" />
      </div>
      }
     </NodeTemplate>
     </SymbolPaletteTemplates>
    </SfSymbolPaletteComponent >

    TooltipTemplate

    Gets or sets the template for rendering a tooltip.

    Declaration
    public RenderFragment<object> TooltipTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment<System.Object>

    The template content used to customize the appearance and content of tooltips.

    Remarks

    This template provides access to the NodeBase context for displaying custom tooltip information when hovering over symbols.

    Examples
      
    
    <SfSymbolPaletteComponent Height="600px">
    <SymbolPaletteTemplates>
            <TooltipTemplate>
            @{
                var target = (context as NodeBase).ID;
                if (target == "node1")
                {
                    <div>
                        <p>Name : Diagram</p><p>Element: @target</p><p>action: Auto</p>
                    </div>
                }
            }
            </TooltipTemplate>
     </SymbolPaletteTemplates>
    </SfSymbolPaletteComponent >

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    Dispose()

    This method releases all unmanaged resources.

    Declaration
    public void Dispose()
    Remarks

    Called to perform cleanup operations and free memory when the component is being disposed.

    OnInitializedAsync()

    Method invoked when the component is ready to start.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Remarks

    This method is called during the component initialization phase to perform startup operations.

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