UIElement.Shadow Property

Definition

Gets or sets the shadow effect cast by the element.

C#
public Shadow Shadow { get; set; }

Property Value

The shadow effect cast by the element.

Windows requirements

Device family
Windows 10, version 1903 (introduced in 10.0.18362.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v8.0)

Examples

Tip

For more info, design guidance, and code examples, see Z-depth and shadow.

Many common controls automatically cast shadows using a ThemeShadow.

If you have the WinUI 2 Gallery app installed and meet the minimum Windows 10 version requirements above, click here to open the app and see the default shadows on common controls.

Remarks

Tip

For more info, design guidance, and code examples, see Z-depth and shadow.

Many common controls automatically cast shadows using a ThemeShadow.

The UIElement.Shadow property can be used to cast shadows from additional visual elements or custom controls.

Applies to

Product Versions
WinRT Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

See also