Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

CheckEdit.CheckedChanged Event

Raises when the IsChecked property value changes.

Namespace: DevExpress.Maui.Editors

Assembly: DevExpress.Maui.Editors.dll

NuGet Package: DevExpress.Maui.Editors

#Declaration

C#
public event EventHandler CheckedChanged

#Event Data

The CheckedChanged event's data class is EventArgs.

#Remarks

Use the IsChecked property to obtain the new value.

#Example

The code below handles the CheckedChanged event to change a MultilineEdit‘s font attributes.

.NET MAUI CheckEdit - ChechedChanged Event

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:dxe="clr-namespace:DevExpress.Maui.Editors;assembly=DevExpress.Maui.Editors"
             x:Class="App1.MainPage">
    <Grid Margin="20,35,20,20">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.5*" />
            <ColumnDefinition Width="0.5*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <dxe:CheckEdit x:Name="boldCheckEdit"
                       CheckedChanged="boldCheckEdit_CheckedChanged"
                       Label="Bold"
                       CheckBoxColor="Red"
                       CheckedCheckBoxColor="Red"
                       VerticalOptions="Center"/>
        <dxe:CheckEdit x:Name="italicCheckEdit"
                       Grid.Column="1"
                       CheckedChanged="italicCheckEdit_CheckedChanged"
                       Label="Italic"
                       CheckBoxColor="Green"
                       CheckedCheckBoxColor="Green"
                       VerticalOptions="Center"/>
        <dxe:MultilineEdit x:Name="multilineEdit"
                           Grid.Row="1"
                           Grid.ColumnSpan="2"
                           Text="Lorem ipsum dolor sit amet."/>
    </Grid>
</ContentPage>
using DevExpress.Maui.Editors;

private void italicCheckEdit_CheckedChanged(object sender, EventArgs e) {
    CheckEdit checkEdit = sender as CheckEdit;
    if((bool)checkEdit.IsChecked)
        multilineEdit.TextFontAttributes |= FontAttributes.Italic;
    else
        multilineEdit.TextFontAttributes &= ~FontAttributes.Italic;
}

private void boldCheckEdit_CheckedChanged(object sender, EventArgs e) {
    CheckEdit checkEdit = sender as CheckEdit;
    if((bool)checkEdit.IsChecked)
        multilineEdit.TextFontAttributes |= FontAttributes.Bold;
    else
        multilineEdit.TextFontAttributes &= ~FontAttributes.Bold;
}
See Also