ToolStripButton
Description
This component represents a toolbar button in Blazor using the Gap.Blazor.ToolStripButton
model. It is rendered inside a Telerik ToolBarButton
and supports displaying an image, text, or both. The component also supports tooltips, autosizing, and click interaction.
Usage
Properties
toolStripButton: Instance of the
Gap.Blazor.ToolStripButton
model.DisplayStyle: Determines whether to show image, text, or both (
Image
,Text
,ImageAndText
).ToolTipText: Tooltip shown on hover.
Image: The image displayed on the button.
Text: The label text displayed on the button.
ImageAlign / TextAlign: Control the float alignment of the image and text.
Methods
OnInitialized(): Subscribes to
NotifyModelChanged
andImageChanged
to update the UI when the model changes.toolStripItemClick(MouseEventArgs): Invokes the
PerformClick()
method on the model when the button is clicked.GetImage(): Retrieves the image source from the model.
ShowImage / ShowText: Boolean flags derived from
DisplayStyle
to control rendering.
Dynamic Rendering
ToolBarButton: Renders the button UI.
Image and Text: Conditionally rendered based on
DisplayStyle
.CSS Styling: Dynamically applies layout and alignment styles.
Styles
Events
Click: Triggered when the button is clicked.
ImageChanged: Updates the UI when the image changes.
NotifyModelChanged: Triggers a full UI refresh when the model changes.
Last updated