blazor-devexpress-dot-blazor-dot-dxribbontab-a3925330.md
Fires when a user clicks the Ribbon tab.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(null)]
[Parameter]
public EventCallback<RibbonTabClickEventArgs> Click { get; set; }
The Click event's data class is RibbonTabClickEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Element | Returns information about a clicked Ribbon element. Inherited from RibbonElementClickEventArgs. |
| MouseEventArgs | The Blazor’s built-in MouseEventArgs event arguments. Inherited from RibbonElementClickEventArgs. |
| Tab | Returns information about a clicked Ribbon tab. |
Use the Click event to react to click on the specific Ribbon tab.
<DxRibbon>
<DxRibbonTab Text="Home"
Click="OnClick" />
<DxRibbonTab Text="Insert" />
</DxRibbon>
<p>You clicked the tab: @ClickedTabText</p>
@code {
string ClickedTabText = "";
void OnClick(RibbonTabClickEventArgs args)
{
ClickedTabText = args.Tab.Text;
}
}
Note
This event only applies to common tabs. To handle clicks on the application tab, use the DxRibbonApplicationTab.Click event.
Alternatively, handle the DxRibbon.TabClick event.
See Also