We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Understanding DockingManagerDemo (SubscribeForEvents)

Thread ID:





94930 Jun 11,2010 10:36 AM UTC Jun 11,2010 01:36 PM UTC WPF 2
Tags: Tools
EXAPT Systemtechnik GmbH
Asked On June 11, 2010 10:36 AM UTC

I have a button in one of the Grid areas in Window1.xaml of the DockingDemo2008 example.

I implemented DoSomething_MouseDown in Window1.xaml.cs
but the code is never being hit. It looks as if every event is intercepted by what is done by SubscribeForEvents().

Could someone explain this to me and how I can overcome this situation?


Michael Matela
Replied On June 11, 2010 01:24 PM UTC

MouseDown is a low-level event. It gets handled by the WPF button class and transformed into a Click event after some logic, such as only firing if both MouseDown and MouseUp are on the same element.

So you should either bind to the Click event or use the Command property. If you need to do something specific on MouseDown which cannot be handled by Click or Command (ex. change the styling), you could use PreviewMouseDown.

EXAPT Systemtechnik GmbH
Replied On June 11, 2010 01:36 PM UTC

Ah, thanks Daniel , for explaining :) I just found out a minute ago, that PreviewMouse... Events do the right thing.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon