I am working on a Kinect app that uses hover buttons and, when a user hovers over a button, a loading circle should appear and fill. My current implementation is in pure C# and drawing to a canvas.
The arc is created like so:
this.loadArc = new Arc();
this.loadArc.StartAngle = 0;
this.loadArc.Width = 150;
this.loadArc.Height = 150;
this.loadArc.ArcThickness = 5;
this.loadArc.ClipToBounds = true;
this.loadArc.Fill = new SolidColorBrush(Colors.White);
canvas.Children.Add(this.loadArc);
And then a timer is started and the Arc fills like this:
this.loadArc.EndAngle += x;
Where x is an angle determined by the time passed and the total time required to hover.
This works fine, but it seems like the arc tried to fill the available space and the shape kind of jumps around. I expected this to show the arc slowly filling to create a circle. Is there something trivial I am missing? Or, better yet, is there a more efficient way to do this (aside from a gif or similar)?
Thanks in advance!