Reputation: 69
I'm making an analog clock-like app and I need the numbers (represented by buttons) on my clock face to be at equidistant points from one another. Is there a way to identify the specific ponts and the distances between them on the ellipse and then place the UI elements centered on the appropriate points? I have a feeling I would need to use a Canvas for this but the logic for its implementation evades me.
In other words, how do I place buttons or other controls on certain equidistant points along a predefined geometry so that they are anchored to those points?
Upvotes: 0
Views: 258
Reputation: 2994
http://www.charlespetzold.com/blog/2006/04/070132.html
Here is an all XAML clock by the great Charles Petzold
http://www.codeproject.com/Articles/29438/Analog-Clock-in-WPF
And here is another solution in WPF which should be easily portable
Upvotes: 1