Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Handling PreviewMouseDown on TabItemEx doesn't work?
posted

I have some TabItems in the xamTabControl, whose contents should be displayed under some circumstances. Otherwise, the user gets a message box and goes back to the previously selected TabItem.

I tried handling the PreviewMouseDown and PreviewMouseLeftButtonDown on the TabItemEx  and xamTabControl. I can check for the condition, but the user still gets to view the contents of the TabItem even if the condition is false. Handling the routed event (setting e.Handled=true) does not get the desired result.

Does anyone know why?