DxRibbonToggleItem.CheckedChanged Event
Fires when a toggle item selection state changes.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.2.dll
Declaration
[DefaultValue(null)]
[Parameter]
public EventCallback<bool> CheckedChanged { get; set; }
Parameters
| Type | Description |
|---|---|
| Boolean | A new Checked property value. |
Remarks
Handle the CheckedChanged event to respond to a toggle item’s selection state changes.
<DxRibbon>
<DxRibbonTab Text="Home">
<DxRibbonGroup>
<DxRibbonToggleItem Text="Bold"
IconCssClass="dx-icon-bold"
CheckedChanged="MakeBold" />
<DxRibbonToggleItem Text="Italic"
IconCssClass="dx-icon-italic" />
<DxRibbonToggleItem Text="Underline"
IconCssClass="dx-icon-underline" />
</DxRibbonGroup>
</DxRibbonTab>
</DxRibbon>
<p style="@textStyle">Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
@code {
string textStyle = "font-weight: normal;";
private void MakeBold(bool args) {
textStyle = args ? "font-weight: bold;" : "font-weight: normal;";
}
}
When selection moves from one item to another in a toggle group and each item has a CheckedChanged event handler, the event fires twice:
- For the newly selected item: argument value is
true. - For the previously selected item: argument value is
false.
Implements
See Also