'Declaration Public Shared Sub SetHandleMouseDownOnClose( _ ByVal d As DependencyObject, _ ByVal value As Boolean _ )
public static void SetHandleMouseDownOnClose( DependencyObject d, bool value )
The current implementation of a System.Windows.Controls.Primitives.Popup is to close itself during the PreviewMouseDown tunnel event and release capture. However, it does not mark the PreviewMouseDown as handled and so the element on which you clicked will still receive a MouseDown event. In certain cases, it is preferrable to have the mouse down that caused the click to be intercepted and not affect the element on which it was clicked until the subsequent mouse click. Setting this property to true will ensure that if the Popup's PreviewMouseDown is invoked and not handled even though the Popup was closed that the PreviewMouseDown is handled and therefore the element on which the mouse was clicked will not receive the MouseDown.
Note: This property will not affect a popup type implementation whereby the popup was closed during the PreviewMouseDownOutsideCapturedElement.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2