Aousaf Rashid
Aousaf Rashid

Reputation: 5738

DropShadow on frame WPF

I am using this code to get a dropshadow effect on my frame :

 <Frame x:Name="MenuItem" Grid.ColumnSpan="2" Content="" HorizontalAlignment="Left"  Height="439" VerticalAlignment="Top" Width="262" Margin="0,130,0,0" BorderBrush="White" BorderThickness="5" NavigationUIVisibility="Hidden">
        <Frame.BitmapEffect>
            <DropShadowBitmapEffect Color="Black" Direction="50"
                ShadowDepth="3" Softness="100" />
            </Frame.BitmapEffect>
    </Frame>

The produced result is this :01

But i want to achieve this : image 2

What changes should i make ??

Upvotes: 0

Views: 272

Answers (1)

Roger Leblanc
Roger Leblanc

Reputation: 1583

Try to set

Background="White"

to your Frame, as the shadow is applied to the texture, so you'll see it everywhere there's transparency inside your control. Also note that DropShadowBitmapEffect is obsolete, you should use DropShadowEffect instead.

Upvotes: 1

Related Questions