Vixen
dd8b0a81
csharp
public sealed class ColorSwatch

One saved colour.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ A roving tab stop rather than one stop per chip. A palette is a set the user picks one of, and giving each chip a tab stop would put a sixteen-press detour in the middle of a dialog — the same reason a radio group and a toolbar are one stop each. So exactly one live swatch in a container has TabIndex zero and the rest have -1, which Focus.TabOrder already reads as "focusable but not a stop", and the arrows move both the focus and the stop.

Fields and properties (8)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • protected override AccessibleRole NativeRole
  • protected override string? NativeAccessibleName
  • protected override AccessibleStates NativeAccessibleState
  • protected override bool RaisesActivation
  • public bool Selectable

    Whether it is a chip that can be chosen, or a picture of a colour.

  • public Color4 Color

    What it shows.

Methods (2)

  • protected override void OnCreated()
  • protected override void OnDraw(DrawContext context)

    Draws whatever this element is, beyond what a stylesheet can describe.

Used by (6)

  • ColorInputVixen.Ui.Controls.Advanced
  • ColorInputTestsVixen.Ui.Controls.Advanced.Tests
  • ColorPickerVixen.Ui.Controls.Advanced
  • ColorPickerFocusRingTestsVixen.Ui.Controls.Advanced.Tests
  • ColorPickerKeyboardTestsVixen.Ui.Controls.Advanced.Tests
  • ColorPickerTestsVixen.Ui.Controls.Advanced.Tests