I'm having a ribbon with a menu that opens a popup, like so:
Before I clicked the button that shows the popup like the pic, some logic is triggered (irrelevant how) that changes the active tab in the ribbon. This can occasionally result in the situation that the popup from the previous tab remained visible but a new tab is visible behind it. When I mouseEnter the popup, I get a StackOverFlowException.
I was thinking of "deactivating" the previous tab or so, does anyone know what I'm doing wrong?
I added the following to achieve what I wanted :) This solution is implementation specific (i.e. based on my investigation of the implementation of the ribbon that we use). The implementation needed a different
originalSource
which I managed to achieve by setting the Source to theRibbonWindow
instance.In my code I call this method and after that I set the new tab to
IsSelected = true;
This implementation differs slightly from what I came across in the impl. because it had little superfluous code.