XamlObjectWriterSettings.IgnoreCanConvert Property

Definition

Gets or sets a value that specifies whether the XAML writer should ignore (not call) CanConvertFrom(ITypeDescriptorContext, Type) implementations on a TypeConverter in type-converter situations.

C#
public bool IgnoreCanConvert { get; set; }

Property Value

true if the XAML writer ignores CanConvertFrom(ITypeDescriptorContext, Type) implementations; otherwise, false. The default is false.

Remarks

The TypeConverter class and its CanConvertFrom method are part of an overall design for type conversion in the CLR. In XAML systems, you can typically assume that type-converter input is identifiable by the XAML reader, and for purposes of input, is always a string. If you set this property to true, you enable a mode where this assumption is codified in the XAML object writer behavior.

This mode supports a compatibility requirement for previous versions of WPF XAML.

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10