public sealed class CardA surface with an optional header and footer.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ The body exists from the start and the other two do not. A card is nearly always just a body, and an empty header still costs its padding. Asking for Header is what creates it, which makes "has a header" and "was given a header" the same fact — so a theme does not have to notice the difference. It now can: :empty is in the selector language, and card-header:empty { display: none } collapses one that was asked for and then never filled. This class does not write that rule, because creating a part and leaving it bare is a caller's mistake rather than a state to style around.
Fields and properties (6)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
protected override bool AcceptsFocusWhether the focus can rest on this kind of control at all.
public UiElement BodyWhere the card's content goes.
protected override UiElement ContentHostpublic UiElement HeaderThe strip above the body, created the first time it is asked for.
public UiElement FooterThe strip below it, created the first time it is asked for.
Methods (1)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
Used by (5)
- GalleryHelloUi
- AccessibilityTreeTestsVixen.Ui.Controls.Tests
- BoxedVixen.Ui.Controls.Tests
- ClickableVixen.Ui.Controls.Tests
- ControlVisualTestsVixen.Ui.Controls.Tests