Tritium UI

TritiumDataForm

Generate a labeled editor for a .NET object, validate it, and commit or cancel the edits.

TritiumDataForm

Key features

  • Point DataObject at a POCO and let the form build one editor per public property.
  • Use a masked entry for masked strings, a numeric entry for numbers, a switch for bool, a date picker for DateTime and DateOnly, and a combo box for enums.
  • Name, order, group, or hide fields with DataFormDisplay, and attach a mask with DataFormMasked.
  • Validate with the standard .NET validation attributes, including Required and Range.
  • Run validation when a field changes, when it loses focus, or only when you call Validate.
  • Replace or cancel an editor in GeneratingEditor before it is shown.
  • Commit succeeds only when validation passes. Cancel restores the object to the values from the last load or successful commit and rebuilds the editors.
  • Turn the whole form read-only, and opt in to haptic or sound feedback on the editors.

Platforms

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

Main API

  • DataObject . The object whose public properties become fields.
  • ValidationMode . LostFocus, PropertyChanged, or Manual.
  • GeneratingEditor . Lets you rename, replace, or skip the editor for one property.
  • Commit . Validates and raises Committed when the object is valid.

Basic example

Declare this namespace on the page.

xmlns:form="clr-namespace:Tritium.Maui.DataForm;assembly=Tritium.Maui.DataForm"
<form:TritiumDataForm x:Name="ContactForm"
                      DataObject="{Binding Contact}"
                      ValidationMode="PropertyChanged" />

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