I have a wpf busy indicator like this on my window:
<Grid><Controls1:BusyIndicator x:Name="busyIndicator2" IsBusy="False" Content="Please wait....." Visibility="Hidden"/>
</Grid>
And in the button click I m trying to set the visiblity,isBusy property of indicator to true and visible.
void button_click(object sender, RoutedEventArgs e)
{
busyIndicator2.Visibility = System.Windows.Visibility.Visible;
busyIndicator2.IsBusy = true;
}
but the indicaotr is not showing up.
Any idea why?
Where is the BusyIndicator defined? For example, if your XAML looks like:
You'll never see the
BusyIndicator
because it's behind the ListBox. I would recommend using theBusyIndicator
as suggested by Chris, otherwise, make sure it's not inadvertently behind other visuals.I've always wrapped other wpf content with the BusyIndicator, it then shows up centered over that content.
Try wrapping your layout control in the BusyIndicator and see if that does what you are after.