Jump to content
Software FX Community

Drawing Annotions at user click


praveen.sekar

Recommended Posts

How to create annotations at points where user clicked such that the centre of the object coincides with the point where user clicked ?

 I have the following code which draws a circle closer to the position.

public void drawBubble(double x, double y, double z)
{      
      Ellipse ellipse = new Ellipse();
      Annotations annotations = new Annotations();
  ellipse.Width = z;
  ellipse.Height = z;
  ellipse.Fill = Brushes.Blue;
  ellipse.Stroke = Brushes.Blue;
  ellipse.StrokeThickness = 10;
  Annotations.SetAttachX(ellipse, x);
  Annotations.SetAttachY(ellipse, y);
      annotations.Children.Add(ellipse);
     
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...