Tritium UI

TritiumSwitch

Bind a boolean to a switch that follows the Tritium accent color.

TritiumSwitch

Key features

  • Bind IsToggled two-way.
  • Use the active theme accent for the on state.
  • Ignore programmatic updates so feedback plays only for a user toggle.
  • Opt in to haptic or sound feedback.
  • DataForm uses it for bool properties.

Platforms

Android, iOS, Mac Catalyst, and Windows 10 version 19041 and later (.NET 10 MAUI).

Main API

  • IsToggled . The on/off value, two-way.
  • HapticFeedback . Opt-in haptic feedback for a user toggle; InputSound is the matching sound switch. Both default off.

Basic example

Declare this namespace on the page.

xmlns:editors="clr-namespace:Tritium.Maui.Editors;assembly=Tritium.Maui.Editors"
<editors:TritiumSwitch IsToggled="True" />

Add the package source from your license, then reference the package that includes this control. These packages are not on the public NuGet Gallery.

Ask Tritium

How-to help and product fit for FleetPro, Tritium UI, and Tritium Reporting.

Ask how to use a feature, or tell us your company, platforms, team size, and use case. Pricing and upgrades go to sales.

Product fit
Contact sales

Search the FAQ