Drop Shadow effect in Universal Windows Application

前端 未结 1 887
没有蜡笔的小新
没有蜡笔的小新 2020-12-07 01:56

I\'m looking for an easy way to add a Drop Shadow effect like in WPF, using XAML only. I would like to apply it for the elements in a ListView.

I haven\'t found anyt

相关标签:
1条回答
  • 2020-12-07 02:28

    If you want to do it yourself with the Composition API, it's quite some work indeed. Luckily we got a great community, and one of those open source projects is the UWP Community Toolkit. This toolkit contains a DropShadowPanel control that does the hard work for you.

    <controls:DropShadowPanel BlurRadius="4.0"
                              ShadowOpacity="0.70"
                              OffsetX="5.0"
                              OffsetY="5.0"
                              Color="Black">
        <Image Width="200" Source="Unicorn.png" Stretch="Uniform"/>
    </controls:DropShadowPanel>    
    

    Note that you'll have to set the app version to 10.0.14393.0 (Anniversary Update) for this effect.

    0 讨论(0)
提交回复
热议问题