Hi Tom,
Greetings from Syncfusion, we have analyzed your query and we would like to inform you that we have drawn annotation rendering element using separate shape. So, we have raised below mouse events manually for annotation shape in our source.
1. MouseRightButtonDown
2. MouseRightButtonUp
3. MouseUp
4. MouseDown
5. MouseMove
6. MouseLeftButtonDown
7. MouseLeftButtonUp
8. MouseLeave
Except these events you have to raise other events manually as per the below code snippet.
Code snippet
Protected Overrides Function ArrangeOverride(finalSize As Size) As Size
AddHandler AnnotationElement.MouseEnter, AddressOf MouseEnter
Return MyBase.ArrangeOverride(finalSize)
End Function
Private Sub MouseEnter(sender As Object, e As MouseEventArgs)
Console.WriteLine("OnMouseEnter")
'SET POSITION
Dim pt As Point = e.GetPosition(CType(MainWindow.gMain, UIElement))
MainWindow.AnnotationPopup.Placement = Primitives.PlacementMode.RelativePoint
..
MainWindow.AnnotationPopup.IsOpen = True
End Sub
Private Sub CustomEllipseAnnotation_MouseLeave(sender As Object, e As MouseEventArgs) Handles Me.MouseLeave
Console.WriteLine("CustomEllipseAnnotation_MouseLeave")
MainWindow.AnnotationPopup.sp.Children.Clear()
MainWindow.AnnotationPopup.IsOpen = False
End Sub |
We have modified your sample based on this, now the sample works fine as per your expect. Please find the sample from the following location.
Hope it helps.
Regards,
Muneesh Kumar G.