Vixen
dd8b0a81
csharp
public static class ControlStrings

Every word the standard control set says, declared once.

Read the guide page for this →

Remarks

The control library's own strings, in the same shape an application declares its own. Thirteen labels — fifteen, with the two dialog-button defaults that doc 46 § A3 recorded as owed to itself — were English literals baked into control constructors, which meant "Clear" in every search box, "Dismiss" on every toast and "Previous tab" on every docked group, inside every localised window, with no way for the application to reach them — and the only party who could close that seam was this repository.

⚠ One class for both control assemblies. Six of these are used from Vixen.Ui.Controls.Advanced, which references this assembly. A second declaration class over there would hand a translator two files to find and would put the boundary between "a control" and "an advanced control" — an assembly split about compile cost — into a translator's workflow, where it means nothing.

⚠ Two ids for the two "Close"s, deliberately. A dialog's dismiss button and a dock tab's are the same English word and are not the same string: a language that distinguishes closing a question from closing a document needs to say so, and an id that says where the string is used is what makes that possible. Merging them saves one line and cannot be undone without a translator's file changing shape.

⚠ A control reads these in its constructor, so it shows the language it was built in. That is not a live binding: Strings.Catalog is a signal and an expression that reads it re-runs, but an assignment in OnCreated is not an expression. A control set that re-labelled itself would need an effect per label and a place to dispose it; what this buys today is that the words are *translatable at all*, and that a control built after the language changed is built in the new one.

Fields and properties (36)

  • public static StringId TextInputClear

    The button that empties a text field.

  • public static StringId FieldRequired

    Why an empty field with Required set is not acceptable.

  • public static StringId FieldOutOfRange

    Why a number outside Minimum and Maximum is not acceptable.

  • public static StringId StepperIncrease

    A stepper's upward arrow.

  • public static StringId StepperDecrease

    A stepper's downward arrow.

  • public static StringId DialogClose

    The button that dismisses a dialog.

  • public static StringId DialogConfirm

    What a confirming button says when the caller does not name it.

  • public static StringId DialogCancel

    And what the button that backs out of it says.

  • public static StringId ToastDismiss

    The button that dismisses a toast.

  • public static StringId SelectSuggestions

    The toggle that opens a combo box's suggestion list.

  • public static StringId DockClose

    The button that closes a docked panel.

  • public static StringId DockPreviousTab

    The button that scrolls a tab strip back.

  • public static StringId DockNextTab

    The button that scrolls a tab strip on.

  • public static StringId PropertyGridReset

    The button that puts a property back to its default.

  • public static StringId PropertyGridSearch

    The prompt in a property grid's filter box.

  • public static StringId ColorPickerIntensity

    The caption over a colour picker's HDR intensity slider.

  • public static StringId ColorPickerEyedropper

    The eyedropper button.

  • public static StringId PaginationPrevious

    The arrow that steps a pager back.

  • public static StringId PaginationNext

    The arrow that steps a pager on.

  • public static StringId ScrollBarVertical

    What a screen reader calls the bar down the side of a scrolling area.

  • public static StringId ScrollBarHorizontal
  • public static StringId ColorPickerHex

    The colour picker's hexadecimal field, which has no caption beside it.

  • public static StringId ColorPickerHue

    The hue band, which is a rainbow and has no words on it.

  • public static StringId ColorPickerAlpha

    The alpha band beneath it.

  • public static StringId ColorPickerField

    The two-dimensional square the marker moves in.

  • public static StringId ColorPickerPalette

    The row of saved colours under it.

  • public static StringId GradientEditorSpace

    The gradient editor's choice of how two stops are mixed.

  • public static StringId GradientEditorOpacity

    The gradient editor's opacity slider, shown when an alpha stop is chosen.

  • public static StringId GradientEditorColorStops

    The rail of colour stops under the bar.

  • public static StringId GradientEditorAlphaStops

    The rail of alpha stops over it.

  • public static StringId NodeCanvasNodes

    The set of nodes on a graph canvas.

  • public static StringId SplitViewDivider

    The bar between a split view's two panes.

  • public static StringId DocumentSavePrompt

    What the prompt on closing a dirty document asks.

  • public static StringId DocumentSave

    The prompt's confirming button.

  • public static StringId DocumentDiscard

    The button that throws the changes away.

  • public static IReadOnlyList<StringId> All

    Every string above, for a translator to start from.

Used by (33)

  • AccessibilityTreeTestsVixen.Ui.Controls.Tests
  • AccessibilityTreeTestsVixen.Ui.Controls.Advanced.Tests
  • AccessibleNameLocalisationTestsVixen.Ui.Controls.Tests
  • AccessibleNameLocalisationTestsVixen.Ui.Controls.Advanced.Tests
  • ColorFieldVixen.Ui.Controls.Advanced
  • ColorPickerVixen.Ui.Controls.Advanced
  • ColorPickerKeyboardTestsVixen.Ui.Controls.Advanced.Tests
  • ColorStripVixen.Ui.Controls.Advanced
  • ComboBoxVixen.Ui.Controls
  • DialogVixen.Ui.Controls
  • DialogServiceVixen.Ui.Controls
  • DockGroupViewVixen.Ui.Controls.Advanced
  • DockTabVixen.Ui.Controls.Advanced
  • DocumentClosePromptVixen.Ui.Controls
  • DocumentClosePromptTestsVixen.Ui.Controls.Tests
  • FieldValidationTestsVixen.Ui.Controls.Tests
  • GradientEditorVixen.Ui.Controls.Advanced
  • GradientRailVixen.Ui.Controls.Advanced
  • GradientRailKeyboardTestsVixen.Ui.Controls.Advanced.Tests
  • LocalisationTestsVixen.Ui.Controls.Tests
  • NodeCanvasVixen.Ui.Controls.Advanced
  • NumericInputVixen.Ui.Controls
  • PaginationVixen.Ui.Controls
  • PropertyGridVixen.Ui.Controls.Advanced
  • PropertyGridTestsVixen.Ui.Controls.Advanced.Tests
  • PropertyRowVixen.Ui.Controls.Advanced
  • ScrollBarVixen.Ui.Controls
  • SearchBoxVixen.Ui.Controls
  • SplitViewVixen.Ui.Controls
  • StepperVixen.Ui.Controls
  • TextFieldVixen.Ui.Controls
  • TextFieldTestsVixen.Ui.Controls.Tests
  • ToastVixen.Ui.Controls