How to use Shadow effect in the border of Flip view item.

Deepak Patel 40 Reputation points
2024-10-04T09:42:43.39+00:00

i have a flipview item , i tried to use drop shadow but it cover in whole grid.

Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 18,476 Reputation points Microsoft Vendor
    2024-10-11T07:13:29.3433333+00:00

    Hi @Deepak Patel

    It is recommended to use ThemeShadow to implement the shadow of the control.

    This example from the documentation shows two Rectangles that cast shadows onto a Grid behind them.

    <Grid>
        <Grid.Resources>
            <ThemeShadow x:Name="SharedShadow" />
        </Grid.Resources>
        <Grid x:Name="BackgroundGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" />
        <Rectangle x:Name="Rectangle1" Height="100" Width="100" Fill="Turquoise" Shadow="{StaticResource SharedShadow}" />
        <Rectangle x:Name="Rectangle2" Height="100" Width="100" Fill="Turquoise" Shadow="{StaticResource SharedShadow}" />
    </Grid>
    
    /// Add BackgroundGrid as a shadow receiver and elevate the casting buttons above it
    SharedShadow.Receivers.Add(BackgroundGrid);
    Rectangle1.Translation += new Vector3(0, 0, 16);
    Rectangle2.Translation += new Vector3(120, 0, 32);
    

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.