public sealed class CheckBoxA box that is ticked or not, with a label.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Three elements: the box, the tick inside it, and the label. The tick is an Icon rather than something drawn here, so that a theme can replace it with its own geometry, and it is present in the tree whether or not the box is ticked — the stylesheet hides it with display: none, which costs nothing and keeps "is it ticked" a single fact in a single place.
Indeterminate is a third appearance rather than a third value. IsChecked stays a bool, because a tri-state checkbox that a caller has to handle three cases for is a tri-state checkbox nobody handles all three cases for. What IsIndeterminate means is "the box does not currently reflect IsChecked, because the things it stands for disagree" — the parent of a half-ticked list — and clicking it resolves it, which is what it is for.
Fields and properties (9)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
public bool IsIndeterminatepublic bool Requiredpublic UiElement BoxThe box the tick is drawn in.
public bool IsValidWhether what it holds is acceptable.
protected override AccessibleRole NativeRoleprotected override AccessibleStates NativeAccessibleStatepublic static readonly UiPropertyKey IsIndeterminatePropertyIdentity for IsIndeterminate.
public static readonly UiPropertyKey RequiredPropertyIdentity for Required.
Methods (6)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
public void Revalidate()Republishes the verdict.
protected override void OnChecked(bool current)Called after the state changed, before it is reported.
protected override void Activate(ActivationDevice device, int count, ModifierKeys modifiers)What activation means for this control.
public void ClearIsIndeterminate()Unsets IsIndeterminate, so it takes its default or its ancestor's value again.
public void ClearRequired()Unsets Required, so it takes its default or its ancestor's value again.
Used by (44, showing 40)
- GalleryHelloUi
- DocumentBenchmarksVixen.Benchmarks.Ui
- AccessibilityNotificationTestsVixen.Ui.Controls.Tests
- AccessibilityTreeTestsVixen.Ui.Controls.Tests
- ButtonTestsVixen.Ui.Controls.Tests
- ControlThemeVisualTestsVixen.Ui.Controls.Tests
- ControlVisualTestsVixen.Ui.Controls.Tests
- DisabledStateTestsVixen.Ui.Controls.Tests
- ElementStateBitTestsVixen.Ui.Controls.Tests
- NodePortEditorVixen.Ui.Controls.Advanced
- OverlayMarkupTestsVixen.Ui.Controls.Tests
- OverlaySheetVixen.Ui.Controls.Tests
- PropertyGridVixen.Ui.Controls.Advanced
- PropertyGridTestsVixen.Ui.Controls.Advanced.Tests
- ToggleInteractionTestsVixen.Ui.Controls.Tests
- AnimationGraphViewVixen.Editor.AssetEditors
- BooleanDrawerVixen.Editor.Inspector
- ChromeFixtureVixen.Editor.Ui.Tests
- CompiledSceneViewVixen.Editor.AssetEditors
- CompositorViewVixen.Editor.AssetEditors
- DrawerTestsVixen.Editor.Inspector.Tests
- EditorApplicationVixen.Editor.App
- FontViewVixen.Editor.AssetEditors
- FontViewTestsVixen.Editor.AssetEditors.Tests
- FrameViewTestsVixen.Editor.AssetEditors.Tests
- InputActionsViewVixen.Editor.AssetEditors
- LayerRowViewVixen.Editor.Texturing
- LayerStackEditingTestsVixen.Editor.Texturing.Tests
- LayerStackThemeTestsVixen.Editor.Texturing.Tests
- LayerStackViewVixen.Editor.Texturing
- MarkupBindingVixen.Editor.Inspector
- MeshMapBakeGeometryTestsVixen.Editor.App.Tests
- MeshMapBakeViewVixen.Editor.App
- NetworkViewVixen.Editor.Debugger
- NetworkViewTestsVixen.Editor.Debugger.Tests
- OptionalDrawerVixen.Editor.Inspector
- OptionalEditorVixen.Editor.Inspector
- OverrideCellVixen.Editor.AssetEditors
- PaletteBlockVixen.Editor.Terrain
- PaletteBlockTestsVixen.Editor.Terrain.Tests