Click on the title bar of the floating document window, PreviewMouseLeftButtonDown event not fired

Docking/MDI for WPF Forum

Posted 12 years ago by Liang Ma
Version: 11.2.0554
Avatar

Hi,

When I open a document window in the docksite, I register the event PreviewMouseLeftButtonDown of the opened document.

After I drag this document window as floating, the event PreviewMouseLeftButtonDown is fired only when click inside the content of the the document window, when I click the title bar, the event won't fired.

Could someone tell me what happened and how to make the event fire?

Thank you!

Comments (2)

Posted 12 years ago by Liang Ma
Avatar

private

staticvoid OnDockSiteWindowOpened(object sender, DockingWindowEventArgs e)

{

var dockSite = sender asDockSite;

if (dockSite == null)

{

return;

}

var dockingWindow = e.Window;

if (dockingWindow == null)

{

return;

}

dockingWindow.PreviewMouseLeftButtonDown += OnDockingWindowPreviewMouseLeftButtonDown;

}

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

Hi Liang,

The event doesn't fire when you click on the title bar because the title bar is rendered by the container, not by the window itself. The event will fire when the window’s tab is clicked, or when its content is clicked, but you can't handle the event for the title bar via the docking window.


Actipro Software Support

The latest build of this product (v24.1.1) 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.