2017-05-03 36 views
0

私のプロジェクトでポップアップ用のシャドウを設定したいのですが、実行するとシャドーが表示されません。 私はこのコードを書いた:設計影にwpfポップアップシャドーが表示されない

<Popup x:Name="popup" IsOpen="False" Width="200" Height="200" Placement="AbsolutePoint" AllowsTransparency="True" PopupAnimation="Fade" > 
     <Grid> 
      <Border BorderThickness="1" Background="#FF4CAAC7" CornerRadius="6" > 
       <Border.Effect> 
        <DropShadowEffect BlurRadius="15" Opacity="0.8" ShadowDepth="10" Direction="-90" RenderingBias="Quality" /> 
       </Border.Effect> 
       <StackPanel Orientation="Horizontal"> 
        <Grid Width="200" Background="Transparent"> 
         <Grid.RowDefinitions> 
          <RowDefinition Height="Auto"/> 
          <RowDefinition Height="Auto" /> 
         </Grid.RowDefinitions> 
         <TextBlock Grid.Row="0" FontWeight="Bold" TextAlignment="Right" Margin="10">Operation was successful</TextBlock> 
        </Grid> 
       </StackPanel> 
      </Border> 
     </Grid> 
    </Popup> 

はshow.whatない実行show.in問題です!!?

答えて

1

Popupの内側のエッジでドロップシャドウが途切れています。境界の周りに影が見える余裕を与えるために、ボーダーに余裕を持たせることで、ポップアップでそれ以上のスペースを確保してください。

<Border 
    BorderThickness="1" 
    Background="#FF4CAAC7" 
    CornerRadius="6" 
    Margin="0,0,15,15" 
    > 
関連する問題