2

Context building:

I have been developing UWP app (C# & XAML) in which I am using a commandbar for displaying some options at the bottom of the page. I am using Primary as well as SecondaryCommands in the commandBar.

What I need:

We have 3 dots at the end. I have one function which will be called when commandbar will be "opened" & "closed". In this function, I need to check if SecondaryCommands menu is opened or not. Secondly, I want to know the event name which is equivalent to StateChanged Event in AppbarButton earlier. for #2, already referred this: Click event for the "..." three dots of the application bar to change the opacity

Note: I have searched the list which comes when I press space in Visual Studio. On SO, I got links which have discussed for earlier version of Windows. Any help would be appreciated. Thanks in advance.

Community
  • 1
  • 1
hellodear
  • 226
  • 1
  • 2
  • 16

1 Answers1

1

As far as Microsoft has explained in this there are Openeing, Opened, Closing and Closed events for CommandBar and they refer to ... 3-dots (Ellipsis).

These events get fired when you press the Ellipsis to open or close the CommandBar. I think this is what you are looking for. And to check the Overflow Menu which contains the Secondary Commands you will have to check if the CommandBar has any secondary commands available with Opening or Opened event.

Let me know in comments if this is not what you need.

Ahmar
  • 740
  • 6
  • 26
  • Ya. One part(events fired on pressing ellipses) is solved with your answer. How will you check that overflow menu is open right now? Secondary commands has 4 commands in it. But I want to check if menu is open right now. Thanks for the quick answer! – hellodear Dec 20 '16 at 07:05
  • Menu will always be available if you press the ellipsis, this is how the `CommandBar` works (but only if it has `SwcondaryCommands`). So if you do have `SecondaryCommands` then menu will always popup. – Ahmar Dec 20 '16 at 07:11