C1TabControl SelectionChanged Event

Posted by: uhlmandanl on 30 May 2023, 7:15 am EST

    • Post Options:
    • Link

    Posted 30 May 2023, 7:15 am EST

    It seems that the SelectionChanged event on the C1TabControl fires before the “SelectedIndex” binding is updated. To me, that is the reverse of what it should do. FlexGrid will update the “SelectedIndex” binding before firing the “SelectionChanged” event. Is the C1TabControl sequence correct?

  • Posted 31 May 2023, 6:27 pm EST

    Hi,

    Thanks for reporting this issue. This behavior seems like a bug. So, we have escalated this to the development team. Will get back to you once we have any update from them.[Internal Tracking Id - C1XAML-33738]

    Best Regards,

    Nitin

  • Posted 1 June 2023, 12:31 am EST

    Thanks Nitin. Please let me know what they find out.

    In the meantime, we are having issues when clicking between tabs and FlexGrid which sets the contents of the tabs and selects the first tab. Sort of a master/details pattern. The contents of the two tabs will change depending on an attribute in the FlexGrid row. Every once in a while, we will get an error when setting the “ActiveTab” property (bound to SelectedIndex of TabControl).

    We get this error: Error HRESULT E_FAIL has been returned from a call to a COM component.

    The line reporting this is: NotifyOfPropertyChange(() => ActiveTab);

    We are using CaliburnMicro as well.

    Not sure, but it sort of appears as maybe there are no tabs present when the ActiveTab (SelectedIndex) property is set, and the property changed event is fired.

    I know that’s not a lot to go on. This just stated happening after we upgraded to v10.0.20222.770. There is no set pattern for making this happen. It is repeatable, but not always with the same steps.

    I discovered the bug above while working on this issue.

    Thanks,

    Dan

  • Posted 1 June 2023, 10:42 pm EST

    Hi,

    We are unable to replicate this behavior at our end. Could you please provide a small sample replicating this behavior? So, that we can investigate and assist you further.

    Best Regards,

    Nitin

  • Posted 1 June 2023, 11:38 pm EST

    I’m not sure I could properly do that without giving you the whole application. Are there any tips on control settings that you may have? Any indication on when a fix for “SelectionChanged” will be in place and if that will be available for v10.0.20222.770?

  • Posted 4 June 2023, 8:53 pm EST

    Hi,

    Apologize for the inconvenience, we tried to replicate this issue but didn’t replicate it. Without replicating this behavior, it is difficult to solve this issue. A small sample is required So, that we can assist you accordingly.

    Regarding SelectionChanged, we have asked for an update on this issue from the development team. Will update you shortly.

    Regards,

    Nitin

  • Posted 13 June 2023, 12:37 am EST

    Hi Nitin,

    Any update on this?

    Thanks,

    Dan

  • Posted 13 June 2023, 5:50 pm EST

    Hi Dan,

    As per the development team, it looks like UWP behaves differently from WPF. With exactly the same code both in our controls and in the sample application, WPF 4.6 version behaves correctly.

    In UWP we see that SelectedIndex property has correct value when TabSelection_Changed event handler is called. But binding to the ViewModel property gets updated later.

    We found this thread which describes exactly the same situation: https://stackoverflow.com/questions/74946079/propertychangedcallback-called-before-binding-viewmodel-updates

    It looks like some issue about UWP platform, not about C1TabControl.

    We don’t see any way to force bindings updates from our side

    I think it’s limitation of UWP platform.

    So, we regret to inform you that this is by design and not possible to fix it.

    Regards,

    Nitin

  • Posted 13 July 2023, 9:30 pm EST

    C1TabControl: Tracking changes with the SelectionChanged event.

Need extra support?

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

Learn More

Forum Channels