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
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 |
---|
Microsoft.AspNetCore.Components.RenderFragment |
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 |
---|
Microsoft.AspNetCore.Components.RenderFragment<Node> |
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 |
---|
Microsoft.AspNetCore.Components.RenderFragment<System.Object> |
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()
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. |