alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class ToolUIBlockContext

    Provides context data for rendering tool blocks in the SfAIAssistView component.

    Inheritance
    object
    ToolUIBlockContext
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.InteractiveChat
    Assembly: Syncfusion.Blazor.InteractiveChat.dll
    Syntax
    public class ToolUIBlockContext
    Remarks

    This class is supplied to the ToolUIBlock render fragment when a tool block is rendered inside a response. It enables custom tool block rendering by exposing the block data and its position within the response.

    Use this context to access the tool block's properties and to apply custom styling or behavior based on its index values.

    Constructors

    ToolUIBlockContext()

    Declaration
    public ToolUIBlockContext()

    Properties

    Block

    Gets or sets the tool block being rendered.

    Declaration
    public ToolBlock Block { get; set; }
    Property Value
    Type Description
    ToolBlock

    The ToolBlock object containing the tool name and additional properties used to render the tool block. The default value is null.

    Remarks

    Use this property to inspect tool metadata such as ToolName and Props when rendering a custom tool block template.

    BlockIndex

    Gets or sets the zero-based index of this tool block within its response's blocks collection.

    Declaration
    public int BlockIndex { get; set; }
    Property Value
    Type Description
    int

    An int representing the position of the tool block among all blocks in the response. The default value is 0.

    Remarks

    Use this index to distinguish tool blocks when multiple blocks are rendered in a single response or to apply alternating styles.

    ResponseIndex

    Gets or sets the zero-based index of the response containing this tool block.

    Declaration
    public int ResponseIndex { get; set; }
    Property Value
    Type Description
    int

    An int representing the response index. The default value is 0.

    Remarks

    Use this value to determine which response item contains the tool block, especially when rendering templates for prompts with multiple responses.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved