我只是想將下面的代碼Kaxaml,並得到了圓角盒陰影。
![Rounded box with drop shadow](https://imgur.com/jN8QM.png)
我建議你試試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