Skip to content

ComboBoxItem IsEnabledChanged not triggered #8537

Open

Description

Describe the bug

When binding to IsEnabled, the IsEnabledChanged handler is never invoked.

Steps to reproduce the bug

//MainWindow.xaml
<StackPanel>
    <ToggleSwitch x:Name="MyToggle" OffContent="Off" OnContent="On"/>
    <ComboBox SelectedIndex="0">
        <ComboBoxItem Content="1"/>
        <ComboBoxItem Content="2" IsEnabled="{x:Bind MyToggle.IsOn, Mode=OneWay}" IsEnabledChanged="ComboBoxItem_IsEnabledChanged"/>
    </ComboBox>
</StackPanel>

// MainWindow.idl
Microsoft.UI.Xaml.Controls.ToggleSwitch MyToggle{ get; };

Expected behavior

Breakpoint hit in ComboBoxItem_IsEnabledChanged when toggling the ToggleSwitch

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.3.1: 1.3.230502000

Windows version

Windows 11 (22H2): Build 22621

Additional context

cppwinrt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions