Vixen
02b45cc4
csharp
public abstract class ToggleBase

Anything with an on and an off.

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

Remarks

A checkbox, a switch, a radio and a toggle button are one behaviour and four appearances: a part that shows the state, a label beside it, Space to flip it, and :checked for the stylesheet. What differs is the part and what the flip is allowed to do — a radio cannot turn itself off — and that is what the two overridable members below are for.

Fields and properties (4)

  • public bool IsChecked
  • protected override bool ActivatesOnEnter

    Whether Enter activates it as well as Space.

  • protected virtual bool CanUncheck

    Whether activating it while it is already on turns it off.

  • public static readonly UiPropertyKey IsCheckedProperty

    Identity for IsChecked.

Events (1)

  • public Action<ToggleBase, bool>? CheckedChanged

    Raised when it goes on or off, however that happened.

Methods (3)

  • protected override void Activate(ActivationDevice device, int count, ModifierKeys modifiers)

    What activation means for this control.

  • protected virtual void OnChecked(bool current)

    Called after the state changed, before it is reported.

  • public void ClearIsChecked()

    Unsets IsChecked, so it takes its default or its ancestor's value again.

Used by (50, showing 40)

  • ShellHelloUi
  • ButtonTestsVixen.Ui.Controls.Tests
  • CheckBoxVixen.Ui.Controls
  • ControlVisualTestsVixen.Ui.Controls.Tests
  • NodePortEditorVixen.Ui.Controls.Advanced
  • PropertyGridVixen.Ui.Controls.Advanced
  • PropertyGridTestsVixen.Ui.Controls.Advanced.Tests
  • RadioButtonVixen.Ui.Controls
  • RadioGroupVixen.Ui.Controls
  • SelectionTestsVixen.Ui.Controls.Tests
  • SwitchVixen.Ui.Controls
  • TimelineVixen.Ui.Controls.Advanced
  • ToggleButtonVixen.Ui.Controls
  • ToggleInteractionTestsVixen.Ui.Controls.Tests
  • AnimationClipViewVixen.Editor.AssetEditors
  • AnimationGraphViewVixen.Editor.AssetEditors
  • AudioMixerViewVixen.Editor.AssetEditors
  • BooleanDrawerVixen.Editor.Inspector
  • ChromeFixtureVixen.Editor.Ui.Tests
  • CompiledSceneTestsVixen.Editor.AssetEditors.Tests
  • CompiledSceneViewVixen.Editor.AssetEditors
  • CompositorViewVixen.Editor.AssetEditors
  • ConsoleViewVixen.Editor.Ui
  • ConsoleViewTestsVixen.Editor.Ui.Tests
  • DrawerTestsVixen.Editor.Inspector.Tests
  • EditorAffordanceTestsVixen.Editor.App.Tests
  • EditorApplicationVixen.Editor.App
  • FontViewVixen.Editor.AssetEditors
  • InputActionsViewVixen.Editor.AssetEditors
  • InspectorViewVixen.Editor.Inspector
  • MarkupBindingVixen.Editor.Inspector
  • MoveSetTestsVixen.Editor.AssetEditors.Tests
  • MoveSetViewVixen.Editor.AssetEditors
  • NodeInspectorVixen.Editor.NodeGraph
  • OptionalDrawerVixen.Editor.Inspector
  • OutlinerColumnTestsVixen.Editor.App.Tests
  • PanelTestsVixen.Editor.Inspector.Tests
  • PortValueTestsVixen.Editor.NodeGraph.Tests
  • ProjectBrowserVixen.Editor.App
  • ProxyShapeViewVixen.Editor.AssetEditors