A Font Awesome Busy Spinner in WPF

Back to index Matthieu Maitre

Font Awesome is a great source of icons for Web Apps, and it happens to work just as well in WPF Desktop apps. In particular fa-spinner can be combined with WPF animations to create a simple busy spinner:


Font Awesome’s CSS style file points to a TTF font file that can be directly copied into the Visual Studio project. At the time of writing, it is available here.

fa-spinner has unicode f110 and animating it is a matter of applying a RotateTransform to a TextBlock and defining an infinite animation as part of a storyboard in XAML:

    <Storyboard x:Key="WaitStoryboard">
        RepeatBehavior="Forever" />

<TextBlock Name="Wait" FontFamily="Fonts/#FontAwesome" FontSize="50" Text="&#xf110;" RenderTransformOrigin="0.5, 0.5">
        <RotateTransform Angle="0" />

The animation can be started (and stopped) on demand by the C# code behind:


See this GitHub repo for the full code.

If you are planning on making more heavy use of Font Awesome, you may consider the FontAwesome.WPF NuGet package which simplifies using those icons.

If you are looking for different styles of busy indicators, a few alternatives are available: