Method TrySetValueFromString
TrySetValueFromString(string)
Attempts to set Value by parsing the supplied string.
public bool TrySetValueFromString(string input)
Parameters
inputstringThe string representation of the value to set.
Returns
- bool
true if
inputwas successfully parsed and assigned; false if the value type cannot be parsed from a string or parsing failed.
Remarks
The default implementation supports:
- string values (assigned directly).
- Any type implementing IParsable<TSelf> (e.g. int, double, DateTime, DateOnly, TimeOnly, TimeSpan, Color).
- Nullable<T> wrappers around any of the above.
- Enum types (case-insensitive).
Views may override this method to provide custom parsing logic.