Docsv3.31.0
Back to API Reference
Class

DecimalFilter

sealed

Filters decimal input: digits [0-9], at most one decimal separator (.,,, or the current culture's), plus a single leading minus sign when AllowNegative. The separator is kept as typed — normalization is a commit concern, not the filter's. The negative option also switches the mobile keyboard to a layout that has a minus key — the iOS decimal pad does not.

public bool AllowNegative{ get; set }

Whether a single leading minus sign is accepted and a signed-capable keyboard requested.

public KeyboardType PreferredKeyboardType{ get }
public override bool Allows(in EditProposal proposal)

Whether the proposed edit may be applied, judged on the post-state it produces. Return false to drop it; the editor then discards it without firing TextChanged. Pure deletions never reach this — character filters do not block deleting.