Card class Core
A card around one child: rounded fill, hairline border and a soft shadow, all drawn - so a card looks the same on every host, including those whose native containers cannot round a corner. The child sits inside Card.Padding; Card.Inset keeps room around the card for its shadow.
public sealed class Card : Control
- Namespace
- ArionUI.Presentation.Controls
- Package
- ArionUI.Presentation ·
dotnet add package ArionUI.Presentation --prerelease - Inherits
- Control
Constructors
Card
public Card(Control child);
Properties
Border
public Func<Rgba>? Border { get; init; }
Children
public override IEnumerable<Control> Children { get; }The controls inside this one, in tree order (visual order, tab order). A host keeps the tree it adopted: a control whose children change once it is adopted says so with Control.TreeChanged (on a shown board inside Board.Mutate), or its new children get no host and Tab, ticks and the wheel do not find them.
CornerRadius
public double CornerRadius { get; init; }
Fill
public Func<Rgba>? Fill { get; init; }Card colours; null takes the theme's card fill and border.
Inset
public double Inset { get; init; }Space around the card, inside the control's bounds, for the shadow.
Padding
public double Padding { get; init; }Space between the card's edge and the child.
Shadow
public Func<Rgba>? Shadow { get; init; }Shadow colour; null draws none.
ShadowBlur
public double ShadowBlur { get; init; }
Methods
Arrange
public override void Arrange(LogRect bounds);
HitTest
public override Control? HitTest(LogPoint p);The control under an ABSOLUTE point, or null. Containers recurse; leaves answer for themselves. Same bounds the render pass used.
Measure
public override LogSize Measure(LogSize available);Desired size given the space available (layout containers sum this).
Render
public override void Render(IRenderSurface s, ControlFrame frame);
