ValueSerializer.ConvertFromString(String, IValueSerializerContext) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, converts a String to an instance of the type that the implementation of ValueSerializer supports.
public:
virtual System::Object ^ ConvertFromString(System::String ^ value, System::Windows::Markup::IValueSerializerContext ^ context);
public virtual object ConvertFromString (string value, System.Windows.Markup.IValueSerializerContext context);
abstract member ConvertFromString : string * System.Windows.Markup.IValueSerializerContext -> obj
override this.ConvertFromString : string * System.Windows.Markup.IValueSerializerContext -> obj
Public Overridable Function ConvertFromString (value As String, context As IValueSerializerContext) As Object
Parameters
- value
- String
The string to convert.
- context
- IValueSerializerContext
Context information that is used for conversion.
Returns
A new instance of the type that the implementation of ValueSerializer supports based on the supplied value
.
Exceptions
value
cannot be converted.
Remarks
The base implementation always throws an exception.
Notes to Inheritors
Avoid throwing exceptions from implementations. See ValueSerializer.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for