SelectionRangeConverter.ConvertFrom 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.
Converts the specified value to the converter's native type by using the specified locale.
public:
override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value);
public override object? ConvertFrom (System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object
Parameters
- context
- ITypeDescriptorContext
A ITypeDescriptorContext that provides a format context.
- culture
- CultureInfo
The locale information for the conversion.
Returns
An Object that represents the converted value
.
Exceptions
value
is of type String but could not be parsed into two strings representing dates.
value
is of type String that was parsed into two strings, but the conversion of one or both into the DateTime type did not succeed.
Remarks
The ConvertFrom method is specialized to convert String values that represent a range of dates to their SelectionRange representations. Types other than String are passed to the base class implementation of this method.
Notes to Inheritors
Override this method to provide your own conversion requirements.
The context
parameter can be used to extract additional information about the environment this converter is being invoked from. The parameter may be null
, so you should always verify the information. Also, properties on the context object may also return null
.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기