IBarButton.Click Property
In This Article
Specifies the button’s Click event handler.
Namespace: DevExpress.Blazor.Office
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
#Declaration
#Property Value
Type | Description |
---|---|
Func<Task> | A delegate method that handles the Click event. |
#Remarks
The following code snippet disables the Insert Field drop-down button on the Mail Merge ribbon tab. To do this, set the Click
event handler to null
.
Razor
<DxRichEdit @ref=@rich CustomizeRibbon=OnCustomizeRibbon />
@code {
DxRichEdit rich;
void OnCustomizeRibbon(IRibbon ribbon) {
RibbonTabCollection tabs = ribbon.Tabs;
DisableFieldDropDownCommandButton(tabs);
}
void DisableFieldDropDownCommandButton(RibbonTabCollection tabs) {
IRibbonTab mailMergeTab = tabs[RichEditRibbonTabNames.MailMerge];
IBarGroup fieldsGroup = mailMergeTab.Groups[RichEditRibbonGroupNames.MailMergeInsertFields];
IBarItem insertFieldItem = fieldsGroup.Items[RichEditBarItemNames.InsertFieldMenu];
if (insertFieldItem.Type == BarItemTypes.DropDown) {
IBarDropDown insertFieldDropDown = (IBarDropDown)insertFieldItem;
insertFieldDropDown.Click = null;
}
}
See Also