I am looking for a simple way to show a loading gif image while the WPF user control loads with heavy data. When the menu item is clicked, the usercontrol poped up and starts loading heavy data from another external Application using async await keyword. That process takes maximum 4 or 5 minutes to complete and the UI is responsive. So if I can show a loading gif image on the top of the user control till it finishes the process, it would have been very good. I searched in the google and got to know about Media Element in WPF.
In the usercontrol, there is 0nly 2 rows and 1 column. The first row is a label for displaying module name and second row contains a data grid. Before the data grid starts the process, how I can show the "loading gif" over the top of either the datagrid or user control.
I did something like below shown
<MediaElement HorizontalAlignment="Center" Margin="0,55,0,0" Name="mediaElement1" VerticalAlignment="Top" Width="198" Height="100"
Source="pack://application:,,,/ProjectA;component/Module/Images/loading.gif"
Panel.ZIndex="0" Grid.Row="1" LoadedBehavior="Play" Stretch="Fill" SpeedRatio="1" IsMuted="False" />
This is not displaying. Could any one share some code to achieve the loading functionality. I will be much obliged.