473,320 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Ellipse At X,Y Location

ThatThatGuy
449 Expert 256MB
This is a XAML Question

I want to draw a Ellipse when mouse is clicked on the canvas in a user control....

im setting this to put the ellipse

Expand|Select|Wrap|Line Numbers
  1.  Ellipse el = new Ellipse();
  2.             el.Fill = Brushes.Black;
  3.             el.Height = 15;
  4.             el.Width = 15;
  5.             el.Margin = new Thickness(e.GetPosition(objSurface).X, e.GetPosition(objSurface).Y, 0, 0);
  6.             objSurface.Children.Add(el);
  7.  
objSurface is the Canvas on which the Ellipse is to be drawn
Jan 28 '10 #1
2 6023
Plater
7,872 Expert 4TB
So what is the problem?
Feb 1 '10 #2
ThatThatGuy
449 Expert 256MB
Now the problem in resolved....

the problem now is

I am drawing a table like layout in xaml user control.....

i use line control to draw columns ..... i give a space if 15 between each vertical line....

my question is when i try the same thing in Windows Forms using GDI+
with the space of 15px between each columns....

the distance between the vertical lines drawn in xaml and windows forms
are not the same


i know that Xaml uses DIP instead of screen pixels....

but how'd i draw lines in pixels in xaml
Feb 2 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Ron Kneusel | last post by:
Is there a python package out there that supports fitting a set of 2D points to an ellipse? I haven't been able to find one. Thanks! Ron
1
by: Nanda | last post by:
hi, try this, bmp=new Bitmap(Width,Height); g=Graphics.FromImage(bmp); g.DrawEllipse(Pens.Red, new Rectangle(0, 0, 100, 100)); g.Save();...
4
by: Shalley | last post by:
Hello, there, I have no idea how to draw an ellipse with an rotated angle. For example, the ellipse's center is (20.0, 50.0), two conjugate diameter pairs end-point are (35.0, 35.0), (25.0,...
5
by: lgeastwood | last post by:
I have tweaked the PictureBox97.mdb (Stephen Lebans <www.lebans.com>) code to nicely draw lines, rectangles and circles to the specs that I input. I'm at a loss though with trying to setup an...
11
by: Christopher Ireland | last post by:
Hello! Using the definition for en ellipse (http://en.wikipedia.org/wiki/Ellipse) I can draw an arc of points. However, the end points of this arc do not coincide with the end points of an arc...
2
by: weird0 | last post by:
I wanted to draw an ellipse using c# with System.Drawing.Graphics. I tried out several tutorials and none of them worked and there seems to be something missing. One did execute without any errors...
3
by: illusion.admins | last post by:
I am trying to code something to tell me if a selected point is in a particular ellipse. For the ellipse I know how it was constructed (know the x,y, and width, height). But if I just check to see...
1
by: PankajGaur | last post by:
Hi, I need to create a Ellipse shaped user control which have folloiwng attributes: 1) The edges are smooth 2) The control shuld only be selected when click on the ellipse shape & not when...
8
by: =?Utf-8?B?RGFu?= | last post by:
I would like to draw an ellipse on a windows form and through mouse drags stretch, rotate and relocate the ellipse. Thanks in advance - Dan
0
by: =?Utf-8?B?UGFua2FqR2F1cg==?= | last post by:
Hi, I need to create a Ellipse shaped user control which have folloiwng attributes: 1) The edges are smooth 2) The control shuld only be selected when click on the ellipse shape & not when...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.