IPart Interface
Provides the base requirements for a part within a part-based edit box.
public interface IPart
Properties
IsEditable
Gets whether the part is editable.
IsLiteral
Gets whether the part is a literal.
IsOptional
Gets whether this part is optional.
Length
Gets the character length of the part within the text.
StartOffset
Gets the start offset of the part within the text.
StringValue
Gets or sets the current string value of the part, if known.
string StringValue { get; set; }
Property Value
- String:
The current string value of the part, if known.
Methods
TryParseText(IList<IPart>, String, Int32, CultureInfo, out Int32)
Tries to parse the text starting offset and returns the offset through which parsing was completed.
bool TryParseText(IList<IPart> parts, string text, int startOffset, CultureInfo culture, out int offset)
Parameter | Type | Description |
---|---|---|
parts | IList<IPart> | The part collection in which this part is a member. |
text | String | The text to examine. |
startOffset | Int32 | The start offset. |
culture | CultureInfo | The CultureInfo to use. |
offset | Int32 | Returns the offset through which parsing was completed. |
Returns
- Boolean:
true
if parsing was successful; otherwise,false
.