1

I'm using busy indicator from wpftoolkit library. This is my code:

<Window x:Class="BusyControl.MainWindow"           
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        xmlns:gif="http://wpfanimatedgif.codeplex.com"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <xctk:BusyIndicator Name="ProgressIndicator" IsBusy="False" Background="Transparent" BorderBrush="Transparent" BorderThickness="0">
            <xctk:BusyIndicator.BusyContentTemplate>
                <DataTemplate>
                    <StackPanel>
                        <Image gif:ImageBehavior.AnimatedSource="Resources/loading.gif" Width="150" Height="50" />
                        <TextBlock Text="{Binding ElementName=ProgressIndicator, Path=BusyContent}" HorizontalAlignment="Center" Margin="3"></TextBlock>
                    </StackPanel>
                </DataTemplate>
            </xctk:BusyIndicator.BusyContentTemplate>
            <xctk:BusyIndicator.ProgressBarStyle>
                <Style TargetType="ProgressBar">
                    <Setter Property="Visibility" Value="Collapsed"/>
                </Style>
            </xctk:BusyIndicator.ProgressBarStyle>
            <Grid>
                <Button Content="Click me" Click="ButtonBase_OnClick" Width="100" Height="50"></Button>
            </Grid>
        </xctk:BusyIndicator>
    </Grid>
</Window>

But my busy indicator looks like

before

but I need transparent busy indicator like this

After

How can I do that?

user2455111
  • 234
  • 1
  • 9
  • The problem with the first one is that some of the greyness is masked by the colour of the background. Nothing in the first picture suggests its not transparaent. – BugFinder Nov 24 '16 at 10:23
  • In sources of wpftoolkit library I saw that parent elenemt of ContentPresenter is a border that has gray background. Is there any way to change background of this border except source changes? – user2455111 Nov 24 '16 at 10:29
  • Ok, I found solution in this post [there](http://stackoverflow.com/questions/18984371/silvelight-busyindicator-background-color-for-the-message-box). I can use my own style – user2455111 Nov 24 '16 at 10:52

1 Answers1

2

The answer will be either styling or changing the template. Here is a question with an answer that shows changing the Template and Styling of that control.

Of course the devil is in the detail... you'll need to do some research to find out specifically what the structure of the control is, to work out how you want to style it. And if you haven't done this kind of thing, I should manage your expectations that it may take a little time to work out what you need to do.

Community
  • 1
  • 1
Richardissimo
  • 5,596
  • 2
  • 18
  • 36
  • 1
    The answer in the other thread is to a different question. This doesn't answer the question of how to make the BusyIndicator transparent. Merely setting the BusyContentTemplate - even with a Background color of Transparent won't make the BusyIndicator transparent. – Christian Findlay Sep 24 '18 at 05:30