PopupButton and AutoHide window problem

Docking/MDI for WPF Forum

Posted 4 years ago by Arkadiusz Piznal
Version: 14.2.0611
Environment: Windows 8 (64-bit)
Avatar

Hi, I have issue with windows AutoHide and PopupButton.

1. Run attached sended via email.
2. Turn on AutoHide in ToolWindow.
3. Click PopupButton in ToolWindow.
4. When popup content appears the ToolWindow lost focus and starts to hide.

It looks like bug but maybe I'm doing something wrong.

Comments (4)

Answer - Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Thank you for the sample.  The auto-hide mode watches for focus to move outside of the flyout.  When it does, it closes the flyout.  With the way you defined the embedded PopupButton, the controls didn't get injected into the control in a way such that IsKeyboardFocusWithin will return true.  Instead of setting the PopupButton's PopupContentTemplate, put all the content of your DataTemplate directly in as the PopupButton's PopupContent.  That gets it working as you would like since keyboard focus is reported by WPF as still within the tool window.


Actipro Software Support

Posted 4 years ago by Arkadiusz Piznal
Avatar

Hi, 

thank you for solution it works fine, but I have related issue. When I close popup content by clicking on popup button a tool window hides.

1. Run second sample sended via email.
2. Turn on AutoHide in ToolWindow.
3. Click PopupButton in ToolWindow.
4. Click PopupButton in ToolWindow again.
5. Popup content hides but also ToolWindow hides.

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Thank you for the sample.  There was a bug where if IsAutoFocusOnOpenEnabled=True, it was moving focus on the popup close too, not just on open.  We've fixed that for the next version.  In the meantime, you can turn that to False to work around the issue.


Actipro Software Support

Posted 4 years ago by Arkadiusz Piznal
Avatar

Hi, 

this workaround works well, thank you.

[Modified 4 years ago]

The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.