3d按钮有透明背景

时间:2014-04-04 09:35:24

标签: wpf 3d

如何使用透明背景的简单3d按钮进行简单的应用?

1 个答案:

答案 0 :(得分:0)

试试这个。你可以通过改变它的背景属性来为它的背景效果。

<Button x:Name="BtnCancel" Content="Close" HorizontalAlignment="Left" Height="42" Margin="720,672,0,0" VerticalAlignment="Top" Width="140" FontSize="22" Opacity="0.695" Foreground="Yellow" Click="BtnCancel_Click" Padding="1,-5,1,0">
        <Button.BorderBrush>
            <RadialGradientBrush>
                <GradientStop Color="Black" Offset="0.017" />
                <GradientStop Color="#FFD1CFCF" Offset="1" />
            </RadialGradientBrush>
        </Button.BorderBrush>
        <Button.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="Black" Offset="0" />
                <GradientStop Color="#9BFFFFFF" Offset="1" />
            </LinearGradientBrush>
        </Button.Background>
    </Button>