title | author | description | keywords | dev_langs | ||
---|---|---|---|---|---|---|
DropShadowPanel |
nmetulev |
The DropShadowPanel Control allows the creation of a drop shadow effect for any Xaml FrameworkElement in the markup. |
windows 10, uwp, windows community toolkit, uwp community toolkit, uwp toolkit, DropShadowPanel, DropShadow, xaml Control, xaml |
|
Warning
This control has been deprecated in the Windows Community Toolkit and will be removed in a future release. Please use the new Attached Shadow helpers instead.
The DropShadowPanel control allows the creation of a drop shadow effect for any Xaml FrameworkElement in the markup.
[!div class="nextstepaction"] Try it in the sample app
<Page ...
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"/>
<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>
Property | Type | Description |
---|---|---|
BlurRadius | double | Gets or sets the blur radius of the drop shadow |
Color | Color | Gets or sets the color of the drop shadow |
IsSupported | bool | Gets a value indicating whether the platform supports drop shadows |
OffsetX | double | Gets or sets the x offset of the drop shadow |
OffsetY | double | Gets or sets the y offset of the drop shadow |
OffsetZ | double | Gets or sets the z offset of the drop shadow |
ShadowOpacity | double | Gets or sets the opacity of the drop shadow |
-
Use IsSupported property to verify the availability of drop shadow and take necessary action if not available
if(!DropShadowPanel.IsSupported) { // Change something to counter the lack of drop shadow }
If Not DropShadowPanel.IsSupported Then ' Change something to counter the lack of drop shadow End If
DropShadowPanel Sample Page Source. You can see this in action in the Windows Community Toolkit Sample App.
DropShadowPanel XAML File is the XAML template used in the toolkit for the default styling.
Device family | Universal, 10.0.16299.0 or higher |
---|---|
Namespace | Microsoft.Toolkit.Uwp.UI.Controls |
NuGet package | Microsoft.Toolkit.Uwp.UI.Controls |