Hi!
Our Commerce System has been created out of Windows Forms Infragistics Controls. It is running on .NET Framework since 2016. Currently we are changing it to run on .NET 6, we made good progress so basically the application is also running on .NET 6.
We are facing an issue with a user control embedded into a popup control container. The popup control container is associated with an UltraTextEditor control displaying the first Email address for the customer. If there are more than one email addresses a letter icon plus the total number of emails will be displayed to give Sales personal an indication that there are more than one Email addresses. If they click into that text editor that popup control container is displayed showing a user control. This user contains an UltraGrid control showing the existing Email Addresses, allowing to add/remove addresses. Since our Sales team is mostly just working with the keyboard the request was to navigate between the addresses just with the keyboard, when they enter an empty address the popup control container should disappear.
This worked fine in the .NET Framework version but now when clicking into the text editor I see the popup control container appear for a short moment before it disappears. I tried to create a playground project with basically same code for the user control which shows almost same behavior except that the popup control container shows when application starts which is probably because the text box receives the focus. As soon as I select the second text box, switch back to first the popup control container just appears very short.
Comparing the events for both scenarios it looks like that it is the DockChanged-event causing this issue because on first opening of the application this event is fired when the second text editor gets the focus. After that whenever I select first text editor the DockChanged event is fired when the popup control container opens. Since my user control reacts on that event it closes the popup control container.
I compared the behavior with the .NET Framework version and here the DockChanged-event is fired when another control is selected therefore the popup control container remains open.
I don't know where this DockChanged-event is raised, probably it is from a Microsoft control but maybe you have a good hint for me how I can handle this?
Thanks in advance,Wolfgang
PopupControlContainerPlayground.zip
I see the flicker when I navigate to the editor, back and forth. I don't know how you would modify the timing of DockChanged if this is what indeed changed to cause this. Have you brought this up to Microsoft?
We haven't encountered this before so it looks like a compatibility issue with what Microsoft might have changed when designing .NET Core. I also see that you are not simply using the form to show the user control but rather the user control has its own popup control container component that is controlling all of this behavior. The popup renders fine when you hook a eg. AfterEnterEditMode and call Show to render the user control local to the form without relying on your ControlState logic as demonstrated in our documentation. Looks like a timing issue in .NET Core.
Hi Michael,
thanks for your instant reply. I was quite sure, that this is a Microsoft issue but if I would report this to them I probably wait until .NET 8 arrived and the question is how they behave when they see the Infragistics controls?
When implementing this functionality I tried to capsule all the functionality into the user control therefore also the popup control container is in the user control. I've used your proposal to put the popup control container into the Form, opening and closing the popup is controlled by the Form. I just created a delegate/event to tell the Form from the user control that it should close the popup control due to business logic in the grid. This now works fine, there is no flickering!
Although the handling of the events is now not capsuled in the user control itself but a little split between the Form and the user control itself it became slightly simpler. I've added it to our commerce system, it seems to work there as well!
Thanks again, I really appreciated it.
Wolfgang