Shadow

A drop shadow behind a view.
public readonly record struct Shadow(double Opacity, double Radius, double OffsetX, double OffsetY, Color? Color)

Constructors

A shadow offset straight down, in the default shadow color.

public Shadow(
  double opacity,
  double radius,
  double offsetY = 0)
ParameterSummary
double opacityThe shadow intensity from 0.0 to 1.0.
double radiusThe blur radius of the shadow edges.
(optional) double offsetYThe vertical displacement of the shadow.

Initializes a new instance of the Shadow struct.

public Shadow(
  double Opacity,
  double Radius,
  double OffsetX,
  double OffsetY,
  Color? Color)
ParameterSummary
double OpacityThe shadow intensity from 0.0 (invisible) to 1.0 (fully opaque).
double RadiusThe blur radius of the shadow edges.
double OffsetXThe horizontal displacement of the shadow.
double OffsetYThe vertical displacement of the shadow.
Color? ColorThe color of the shadow, or null to use the system default.

Properties

Color

The color of the shadow, or null to use the system default.

Type: Color?

public Color? Color { get; init; }

OffsetX

The horizontal displacement of the shadow.

Type: double

public double OffsetX { get; init; }

OffsetY

The vertical displacement of the shadow.

Type: double

public double OffsetY { get; init; }

Opacity

The shadow intensity from 0.0 (invisible) to 1.0 (fully opaque).

Type: double

public double Opacity { get; init; }

Radius

The blur radius of the shadow edges.

Type: double

public double Radius { get; init; }