ComboBox GotFocus does not fire first by InvokeCommandAction on CellEditingTemp

Posted by: info on 18 April 2021, 12:04 pm EST

  • Posted 18 April 2021, 12:04 pm EST


    C1.WPF.Grid.Ja 5.0.20203.37
    Microsoft.Xaml.Behaviors.Wpf 1.1.31
    ReactiveProperty 7.8.3

    ComboBox GotFocus fires first by InvokeCommandAction

    <ComboBox Width="100" VerticalAlignment="Stretch">
    <bh:EventTrigger EventName="GotFocus">
    <bh:InvokeCommandAction Command="{Binding ComboBoxFocus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" PassEventArgsToCommand="True" />
    <ComboBoxItem>Item A</ComboBoxItem>
    <ComboBoxItem>Item B</ComboBoxItem>
    <ComboBoxItem>Item C</ComboBoxItem>

    ComboBox GotFocus does not fire first by InvokeCommandAction.

    I need to use MVVM. So I'd like to use InvokeCommandAction.
    Will it be fixed?
  • Replied 18 April 2021, 9:24 pm EST

    Hi Mikihiro,

    Thank you for sharing the sample.

    This behavior seems like a bug so I have escalated it to the devs and will get back to you when there is any update. (Internal Tracking Id - C1XAML-27333)

    Best Regards,
  • Replied 18 April 2021, 9:32 pm EST

    Thank you for your help.
    I will wait.
  • Marked as Answer

    Replied 27 April 2021, 4:39 pm EST

    Hi Mikihiro,

    As per the devs, you can set the EventTrigger's SourceObject property to the ComboBox itself in order to overcome this behavior as follows:
    <bh:EventTrigger EventName="GotFocus" SourceObject="{Binding ElementName=comboBox}">

    Please refer to the same from the attached modified sample. (see

    Best Regards,
  • Replied 2 May 2021, 8:03 pm EST

    I understand. Thank you.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels