wpfxamllayoutgriddropshadoweffect

adjust drop shadow size in WPF. shown in the image


enter image description here

I try to resize the drop shadow effect in WPF. But I did not find any answer.


Solution

  • You cannot set margin to your shadow, so you could "hide" another simple

    Border behind your "real" Border.

    Wrap them in a Grid that will hold both of them in the same place.

    Set your margin on that Border, and set the shadow effect on it as well.

    <Grid>
       <Border Margin="20,20,0,0">
           <Border.Effects>
              <DropShadowEffect />
           </Border.Effects/>
       </Border>
       <Border x:Name="YourOriginalBorder"/>
    </Grid>