OutlookEvents.ExplorerSelectionChange event raising when I hover over the tasks on navigation pane

Add-in Express™ Support Service
That's what is more important than anything else

OutlookEvents.ExplorerSelectionChange event raising when I hover over the tasks on navigation pane
 
Tibor V?zh?ny?




Posts: 15
Joined: 2017-03-13
Hi,

there is this feature where I can quickly change to my calendar, contacts, tasks, etc on the bottom left corner. I will call it navigation pane though it might not the correct name.

I've noticed an interesting thing:
- we are using the 9.4 Add-in Express for different reasons I cannot do anything about it at this moment.
- we have implemented two RightReadingPane for the explorer. These panes are exclusive and only one of them supposed to be shown. We change the visibility of the panes when the explorer goes to inline compose mode by calling the form Hide() or Show() (We have inherited them from ADXOlForm and only contains an ElementHost control). It works fine for ages.
- I've changed something which seemed irrelevant then when I hover over the tasks on the navigation pane both pane becomes visible. I've checked not my code calls the Show(). I've reverted back that irrelevant change and it solved the visibility issue and I can live with it how it is.

I've investigated a little further and it seems when I hover over the Tasks on the navigation pane and it starts to show my tasks (before they become visible) my add-in's OutlookEvents.ExplorerSelectionChange called (twice). It then triggers a bunch of code in my add-in involving some REST calls etc. which is suboptimal. It is strange because it is not called when I hover over the appointments or the contacts.

My question is how can I detect this use case in the AddinModule's event handler so I can return gracefully?

Thank you.

PS if I can get an answer why the supposed to be hidden pane became visible it would be also appreciated.
Posted 28 Jun, 2022 08:04:10 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Tibor,

We can't reproduce this. Could you please create a test project showing the same behavior?

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Jun, 2022 03:44:42 Top
Tibor V?zh?ny?




Posts: 15
Joined: 2017-03-13
I've made a simple add-in which I can reproduce the issue.

https://github.com/vtiti/MyAddin69
Posted 07 Jul, 2022 05:56:17 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Thank you, Tibor.

We are unable to reproduce the issue. I believe this occurs because in newer Office builds, the changed the UI - this occurred quite a while ago - so that tasks are shown differently and although a pane with tasks still pops up, there's no SelectionChange event.

Anyway, we suggest that you use the ADXOlForm.ADXBeforeFormShow event to prevent two forms from being shown simultaneously: you can set ADXOlForm.Visible = false on a form that must be hidden.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 07 Jul, 2022 09:37:42 Top
Tibor V?zh?ny?




Posts: 15
Joined: 2017-03-13
We are unable to reproduce the issue. I believe this occurs because in newer Office builds, the changed the UI - this occurred quite a while ago - so that tasks are shown differently and although a pane with tasks still pops up, there's no SelectionChange event.


Would you elaborate this? It made me a bit more confused.
I'm using Outlook 2019 Version 1808 (the version which still uses Internet Explorer for the new add-ins. fml)
No new look, just the old-school design.

We have no pane for tasks defined.
I've tested and indeed the ADXBeforeFormShow event called. I'm sure my add-in not called the Show() so I'm assuming the engine calling it. But why if the pane is only binded to mails? (ExplorerItemTypes = AddinExpress.OL.ADXOlExplorerItemTypes.olMailItem)

Would you explain me what happening behind the curtains when I hover over the tasks?
And back to my original question, why I get SelectionChanged (twice)? I cannot see any differences in the handlers parameters. Is there anything I could check to just do nothing in this case?
Posted 08 Jul, 2022 05:40:35 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Tibor,

Let's start with ExplorerSelectionChange. Add-in Express doesn't intercept this event; only your code intercepts it. Why it occurs twice - we can't explain this as the event is raised by Outlook. We suggest that you write some checks to prevent showing two forms simultaneously.

Tibor V?zh?ny? writes:
Would you explain me what happening behind the curtains when I hover over the tasks?


Outlook shows a mini-window displaying some tasks from a task folder. We assume this raises the SelectionChange event: you handle this event, and you call UpdateVisibility(); we assume this method is responsible for the issue.

We suggest that you perform an experiment where only the code Of Add-in Express works: 1) comment out the code in the SelectionChange event, 2) start Outlook and close the form(s), 3) hover over the tasks in the Navigation pane. If the form(s) get shown, there may be an issue in Add-in Express.

A side note: your _inInlineResponseMode variable doesn't let you handle this scenario: 1) show an explorer with an inline response, 2) show another explorer without an inline response, and 3) switch between the explorer windows.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 08 Jul, 2022 09:52:06 Top