I am having a small issue that I have not been able to get around implementing the Busy Indicator. As a test, I set up a small page and copied the Custom Content example code from the busy indicator onto my page. I did delete the "<ContentControl Style="{StaticResource SampleContent}"/>". I have included the code below.
For some reason, a button outside of the busy indicator is able to bind the the action I wanted completed on a button press. But the button inside the busy indicator tied to the exact same binding does nothing. Any idea what I am doing incorrectly?
For some reason, a button outside of the busy indicator is able to bind the the action I wanted completed on a button press. But the button inside the busy indicator tied to the exact same binding does nothing. Any idea what I am doing incorrectly?
<Window x:Class="CounterDisplayTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="MainWindow" Height="350" Width="525"
xmlns:local="clr-namespace:CounterDisplayTest">
<Window.DataContext>
<local:DeviceViewModel/>
</Window.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal"
Grid.Row="0">
<Label>Counter Value:</Label>
<Label Content="{Binding Count}"></Label>
</StackPanel>
<Button Grid.Row="1"
Name="Cancel"
Content="Cancel Content"
Command="{Binding ClearCounter}"
/>
<xctk:BusyIndicator IsBusy="True" DisplayAfter="0" Grid.Row="2">
<xctk:BusyIndicator.BusyContentTemplate>
<DataTemplate>
<StackPanel Margin="4">
<TextBlock Text="Downloading My Email" FontWeight="Bold" HorizontalAlignment="Center"/>
<StackPanel Margin="4">
<TextBlock Text="Downloading message 4/10..."/>
<ProgressBar Value="40" Height="15"/>
</StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Content="Pause" HorizontalAlignment="Right" Margin="0 0 2 0" Command="{Binding ClearCounter}"/>
<Button Grid.Column="1" Content="Cancel" HorizontalAlignment="Left" Margin="2 0 0 0"/>
</Grid>
</StackPanel>
</DataTemplate>
</xctk:BusyIndicator.BusyContentTemplate>
<xctk:BusyIndicator.OverlayStyle>
<Style TargetType="Rectangle">
<Setter Property="Fill" Value="Pink"/>
</Style>
</xctk:BusyIndicator.OverlayStyle>
<xctk:BusyIndicator.ProgressBarStyle>
<Style TargetType="ProgressBar">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</xctk:BusyIndicator.ProgressBarStyle>
</xctk:BusyIndicator>
</Grid>
</Window>