1
私はwpftoolkitライブラリのビジーインジケータを使用しています。これは私のコードです:ビジー状態のインジケータが透明
<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>
しかし、私のビジーインジケータは
のように見えますが、私はそれを行うことができますどのようにこの
のような透明ビジーインジケータが必要ですか?
最初の問題は、グレーの一部が背景の色でマスクされていることです。最初の写真には、それが透明でないことが示唆されるものはありません。 – BugFinder
wpftoolkitライブラリのソースでは、ContentPresenterの親要素が背景が灰色であることがわかりました。ソースの変更を除いて、この境界の背景を変更する方法はありますか? – user2455111
[OK]を、私はこの記事[there](http://stackoverflow.com/questions/18984371/silvelight-busyindicator-background-color-for-the-message-box)で解決策を見つけました。自分のスタイルを使うことができます – user2455111