Class StringToListConverter
This class converts string value to list
Inheritance
System.Object
StringToListConverter
Implements
Microsoft.Maui.Controls.IValueConverter
Namespace: Syncfusion.Maui.Core.Converters
Assembly: Syncfusion.Maui.Core.dll
Syntax
public class StringToListConverter : Object, IValueConverter
Constructors
StringToListConverter()
Declaration
public StringToListConverter()
Properties
Separator
Gets or sets the value string that separates the substrings in this string.
Declaration
public string Separator { get; set; }
Property Value
Type |
---|
System.String |
Separators
Gets or sets the value strings that separates the substrings in this string.
Declaration
public IList<string> Separators { get; }
Property Value
Type |
---|
System.Collections.Generic.IList<System.String> |
SplitOptions
Gets or sets the value decides whether to trim substrings and include empty substrings.
Declaration
public StringSplitOptions SplitOptions { get; set; }
Property Value
Type |
---|
System.StringSplitOptions |
Methods
Convert(Object, Type, Object, CultureInfo)
This method is used to convert string to list Converts string value to an list type.
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value must be the type of string |
System.Type | targetType | The type of the target property |
System.Object | parameter | An additional parameter for the converter to handle, not used |
System.Globalization.CultureInfo | culture | The culture to use in the converter, not used |
Returns
Type | Description |
---|---|
System.Object | Returns the list value of the string |
ConvertBack(Object, Type, Object, CultureInfo)
Converts back is impossible to revert to original value
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | |
System.Type | targetType | |
System.Object | parameter | |
System.Globalization.CultureInfo | culture |
Returns
Type |
---|
System.Object |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException |
Implements
Microsoft.Maui.Controls.IValueConverter