tags:

views:

47

answers:

0

Hi

I have created a simple ellipse in XAML like, Canvas Name="cnvMain" Ellipse Name="e1" Width="147" Height="89" Canvas.Left="64" Canvas.Top="89" Stroke="Black" /Ellipse Button Name="btn" Height="32" Width="65" Canvas.Left="102" Canvas.Top="197" Click="btn_Click" Cut /Button Canvas

When I click this button, I need to get the collection of co-ordinates or points that draws this ellipse.

I can get the basic offset by for (int ctr = 0; ctr < cnvMain.Children.Count; ctr++) { UIElement ue = cnvMain.Children[ctr]; FrameworkElement fe = ue as FrameworkElement; Vector rubberVnew = VisualTreeHelper.GetOffset(fe); } But I need all the points which actually creates the whole shape. For example, A line was drawn starting from 10,10 to 20,10. Here, I will be needing the points, 10,10 - 11,10 - 12,10 - ...... 20,10. How to get this?