Reputation: 686
I have a custom TaskPane in Outlook. When the user toggles the visibility, I record it in the settings object so that the next time Outlook starts it will be shown/hidden as the user left it.
CustomTaskPane.VisibleChanged
is raised in each of the following scenarios
TaskPane.Visible
is set in response to the user pressing a toggle button in the ribbonThe first two ways, the user clearly meant to hide the task pane. The third way the user was just trying to go to the menu screen (perhaps on their way to hit the Exit button).
Question
Is there anyway to determine that the event was raised because of the File Menu? Any way to programatically determine if the File Menu is currently open?
Here's what I mean by the File Menu Screen:
Upvotes: 0
Views: 209
Reputation: 49395
The Backstage UI provides two callbacks that can be used for tracking when the File menu is open and closed:
The onShow attribute and the onHide attribute of the element can point to code that performs that kind of action.
<backstage onShow="OnShow">
See Customizing the Office 2010 Backstage View for Developers for more information.
Upvotes: 1