Writing a WPF application often requires communicating with Server. When the WPF application requires to contact with server, we would like to show a neat animation on the UI like Internet explorer.
This listing shows a way to create an userControl which can be used in applications like
xmlns:WA="clr-namespace:WaitingAnimated" .... />
Margin="200, 50, 300, 300"/>
In the source code attached I have a toggle button which starts/stops the animation by setting the value of IsAnimated to true or false...
private void Button_Click(object sender, RoutedEventArgs e)
animatedIcon.IsAnimated = !animatedIcon.IsAnimated;
Going thru XAML in the user control which is not rocket science but still...
The Grid.Resources has a storyboard, the repeat behavior of animation is forever and the storyboard target property is Angle of the path.
Path is the union of two circles. The important things in path are the rendertransform origin which translates the origin to the corresponding value, i typically define rendertransform and add all children even if i dont use to keep code extensible. Path fill is the color in the circular path which is filled .
Source code here.