index > Windows Presentation Foundation ("Avalon") > Mouse Over

Mouse Over

How can i find out if the mouse is over my custom panel in my MainWindow
Claudiu Chiorean
How about the MouseEnter property?
Frances83
It's not working

And i don't know what else to use

I think that the mouse has to be over that element directly for this event to happen.

Any other sugestions.
Claudiu Chiorean

Claudiu, you're absolutely right in saying that it doesn't work

DmitryMS
Quick question, are you trying to implement some form of dockable windows?


What's in your toolbelt? http://www.codeplex.com/Wiki/View.aspx?ProjectName=wpftoolbelt
ivolved_Mike_Brown
yep


Claudiu Chiorean

The first thing that comes to mind is that you want to override the child Window's OnMouseDown function and have it start a Drag and Drop operation. Then you can handle OnDragEnter in your main Window.




What's in your toolbelt? http://www.codeplex.com/Wiki/View.aspx?ProjectName=wpftoolbelt
ivolved_Mike_Brown

Better than overriding would be a helper class that has an attached property (WindowDockable?). Register a DependencyPropertyChangedHandler that is fired when the property is set on a window. In the handler add a listener for PreviewMouseDown on that Window. And the listener can start the Drag and Drop operation.

I love attached properties...they make adding functionality non-invasive (I.E. you don't have to subclass a class to add functionality to it).




What's in your toolbelt? http://www.codeplex.com/Wiki/View.aspx?ProjectName=wpftoolbelt
ivolved_Mike_Brown
reply 8

You can use google to search for other answers

 

More Articles

• Inconsistence for DataTemplate.FindName on GridViewColumn
• Elements wrapping in Panel
• PPT Show in XAML
• how to access visuals created by streamGeometry in visualCollecti...
• XmlDataProvider - Recommend when using large files
• How to prevent duplicate items in Listview control?
• Event happening twice
• ppt file can't show on server
• RichTextBox, get Insert mode?
• When is Binding.ElementName non-NULL?
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• UserControl: Use of Custom Control and E
• Using merged ResourceDictionaries with t
• How to prevent duplicate items in Listvi
• FindItemWithText in ListviewItem?
• Using GuidelineSet with DrawingContext
• Strings, Integers, and Colors in Resourc
• Possible rendering bug when overwriting
• Referencing components.....
• Creating UserControl and compiling as DLL
• How to transfer(Upload) file to remote s
• BitmapImage is not raising the DownloadC
• Vertical lines in the GridView
• Invalidate Layout Transformation
• How do you walk the controls in a XAML p
• 3D animation Performance

Hot Articles

• Which version of Windows Media Player fo
• PreviewMouseMove event of Canvas not rec
• Howto change appearance and/or behavior
• Windows Controls in Viewbox
• Installer that requieres WPF
• DwmEnableComposition(bool) Call Not Work
• Using Canvas.SetTop is only working in d
• Navigation between pages
• Writing reusable effects in XAML
• Resize Elements inside the canvas
• Changing default editor for XAML
• Menu items disabled when setting a command
• Pass mouseevents to Inkcanvas childobjects
• Vista style blur?
• Populating TreeView with xml file in c#?

Recommend Articles

• Force-rendering one control(tree)?
• How do you disable Minimize, Maximize, C
• using WPF in MTA applications
• Disabling Edits/Selections on FlowDocume
• Binding the TabItem Content
• Setting data source from codebehind?
• extending canvas
• How can I get textureCoordinate for one
• Textblock animation in RC1
• GridViewColumnHeader: Prevent column reo
• Cider and Events
• No AdornerLayer on a floating window.
• attaching events with a polyline
• Tables & ItemsControl
• Vista RC1 on MSDN