我只是想将下面的代码Kaxaml,并得到了圆角盒阴影。
我建议你试试Kaxaml也仅仅是用来做实验,从你可能拥有的任何其他代码分开。如果这个确切的代码是而不是显示阴影,那么问题必须与您的系统。
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
>
<Border CornerRadius="10"
BorderBrush="Gray"
BorderThickness="3"
Background="AliceBlue"
Margin="24"
Padding="4"
Width="100"
Height="100"
>
<Border.Effect>
<DropShadowEffect Color="Gray"
Opacity=".50"
ShadowDepth="16" />
</Border.Effect>
<Grid Background="AliceBlue">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Hello world.</TextBlock>
</Grid>
</Border>
</Window>
你说得对。此代码适用于其他计算机,但不适用于我的计算机。感谢帮助。 – GTD 2009-11-20 09:01:42