PopupButton and AutoHide window problem

Docking/MDI for WPF Forum

Posted 9 years ago by Arkadiusz Piznal
Version: 14.2.0611
Platform: .NET 4.5
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 9 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 9 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 9 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 9 years ago by Arkadiusz Piznal
Avatar

Hi, 

this workaround works well, thank you.

[Modified 9 years ago]

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.