PopupButton in Menu

Ribbon for WPF Forum

Posted 13 years ago by Owen Christensen - Software Engineer, Minitab Inc.
Version: 11.1.0541
Avatar
Perhaps I'm missing some blatantly obvious property but is there a way to have a PopupButton's Popup open on MouseOver when it's part of a Menu? I've got an issue logged against our ribbon implementation that requiring the user to hold their mouse still over a PopupButton for so long before the Popup opens is undesirable.

  <ribbon:PopupButton Label="Parent">
    <ribbon:Menu>
      <ribbon:PopupButton Label="Child 1"/>
      <ribbon:PopupButton Label="Child 2"/>
    </ribbon:Menu>
  </ribbon:PopupButton>
I've tried

  <ribbon:PopupButton Label="Child 1" IsPopupOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"/>
which works. Until I let the mouse sit the previously requisite time for opening the popup. I suspect the PopupButton must be wiping out my Binding because it then goes back to needing to wait half a second or so before the popup opens (or clicking it)

I've tried with a StackPanel instead of a Menu as well to no avail.

[Modified at 06/07/2011 10:58 AM]

Comments (4)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Owen,

There already is built-in functionality for showing PopupButton popups when the PopupButton is in a Menu and the mouse is over it. I just tested it and it seems to be working ok, and uses the standard Windows hover time for menu display.


Actipro Software Support

Posted 13 years ago by Owen Christensen - Software Engineer, Minitab Inc.
Avatar
Yes the mouse over does work. I'm asking more about the delay - which is the part that's undesirable. Attempting to directly bind the popup opening to the IsMouseOver flag works (ie the popup opening is immmediate)...but only until/unless you wait until that time to expire. At that point my binding seems to have been wiped.

[Modified at 06/07/2011 03:17 PM]
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry but the delay is intended to match system menu popups. As popups open, it probably would wipe out that binding since the property would be set programmatically. You can always click the popup button to show it immediately though instead of waiting for the brief delay.


Actipro Software Support

Posted 13 years ago by Owen Christensen - Software Engineer, Minitab Inc.
Avatar
Good enough for me. Thanks!
The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.