RoutedEventConverter.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.
Attempts to convert the specified object to a RoutedEvent object, using the specified context.
public:
override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ typeDescriptorContext, System::Globalization::CultureInfo ^ cultureInfo, System::Object ^ source);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, System.Globalization.CultureInfo cultureInfo, object source);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (typeDescriptorContext As ITypeDescriptorContext, cultureInfo As CultureInfo, source As Object) As Object
Parameters
- typeDescriptorContext
- ITypeDescriptorContext
A format context that provides information about the environment from which this converter is being invoked.
- cultureInfo
- CultureInfo
Culture specific information.
- source
- Object
The object to convert.
Returns
The conversion result.
Exceptions
source
is not a string or cannot be converted.
Remarks
The RoutedEventConverter class only converts from String. Various techniques are employed in an attempt to obtain a result. typeDescriptorContext
is checked for various services including IXamlTypeResolver, IXamlSchemaContextProvider, and IAmbientProvider. The provided string is also checked against the internal list of WPF registered routed events on FrameworkElement. If all these attempts fail to resolve, NotSupportedException is thrown.
Applies to
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про