ToolStripLabel

Description

This component represents a non-interactive label within a ToolStrip in Blazor using the Gap.Blazor.ToolStripLabel model. It is rendered inside a Telerik ToolBarTemplateItem and supports tooltip display and optional click interaction.

Usage

<WMStyleBase model=@toolStripLabel></WMStyleBase>

<ToolBarTemplateItem>
    <label class="@(toolStripLabel.GetStringClasses() + " " + toolStripLabel.GetToolTipClass())"
           title="@toolStripLabel.GetToolTipText()"
           onclick="@toolStripItemClick">
        @toolStripLabel.Text
    </label>
</ToolBarTemplateItem>

<style>
    [email protected]() {
        position: relative;
    }
</style>

Properties

  • toolStripLabel: Instance of the Gap.Blazor.ToolStripLabel model.

  • Text: The label text displayed in the toolbar.

  • ToolTipText: Tooltip shown when hovering over the label.

  • CSS Classes: Dynamically generated using GetStringClasses() and GetToolTipClass().

Methods

  • toolStripItemClick(MouseEventArgs): Invokes the PerformClick() method on the model when the label is clicked. This allows the label to optionally behave like a button if needed.

Dynamic Rendering

  • ToolBarTemplateItem: Used to render the label inside a Telerik ToolBar.

  • Label Element: Displays the text and handles optional click events.

  • Tooltip: Displayed via the title attribute.

Styles

  • Position

Events

  • Click: Triggered when the label is clicked, if PerformClick() is implemented in the model.

Last updated