{"record":{"id":"de548ffdffa6c00c","repo":"dotnet/wpf","slug":"the-method-or-operation-is-not-implemented","errorCode":null,"errorMessage":"The method or operation is not implemented.","messagePattern":"The method or operation is not implemented\\.","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/ColorTypeConverter.cs","lineNumber":111,"sourceCode":"        /// <returns>\n        /// An Object that represents the converted value.\n        /// </returns>\n        public\n        override\n        object\n        ConvertFrom(\n            ITypeDescriptorContext              context,\n            System.Globalization.CultureInfo    culture,\n            object                              value\n            )\n        {\n            ArgumentNullException.ThrowIfNull(value);\n            if (!IsSupportedType(value.GetType()))\n            {\n                throw new NotSupportedException(SR.Converter_ConvertFromNotSupported);\n            }\n\n            throw new NotImplementedException();\n        }\n\n        /// <summary>\n        /// Converts the given value object to the specified type,\n        /// using the arguments.\n        /// </summary>\n        /// <param name=\"context\">\n        /// An ITypeDescriptorContext that provides a format context.\n        /// </param>\n        /// <param name=\"culture\">\n        /// A CultureInfo object. If null is passed, the current\n        /// culture is assumed.\n        /// </param>\n        /// <param name=\"value\">\n        /// The Object to convert.\n        /// </param>\n        /// <param name=\"destinationType\">\n        /// The Type to convert the value parameter to.","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/ColorTypeConverter.cs#L93-L129","documentation":"ColorTypeConverter.ConvertFrom throws NotImplementedException for any supported input type: its body intentionally ends with 'throw new NotImplementedException()'. Conversion 'from' via this converter is simply not implemented in ReachFramework.","triggerScenarios":"Calling ConvertFrom (e.g. ConvertFromString) on ColorTypeConverter with a value of a type that passes IsSupportedType - the method always throws.","commonSituations":"XAML designer or serialization frameworks invoking the converter; developers assuming the standard TypeConverter contract is honored.","solutions":["Do not use ColorTypeConverter.ConvertFrom; use ColorConverter.ConvertFromString/ConvertFromInvariantString.","Construct Color directly via Color.FromRgb/Color.FromArgb.","Guard calls with a try/catch for NotImplementedException if the converter is invoked indirectly.","Register a custom TypeConverter implementing conversion if you need this path."],"exampleFix":"// before\nvar c = (Color)TypeDescriptor.GetConverter(typeof(Color)).ConvertFrom(null, null, \"Red\");\n// after\nvar c = Color.FromRgb(0xFF, 0x00, 0x00);","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { return converter.ConvertFrom(context, culture, value); }\ncatch (NotImplementedException) { return ColorConverter.ConvertFromString(value?.ToString()); }","preventionTips":["Assume ColorTypeConverter.ConvertFrom is always non-functional.","Construct Color values directly with Color.FromRgb/FromArgb.","Register a custom TypeConverter if conversion-from is required."],"tags":["wpf","type-converter","not-implemented"],"backgroundTag":"method-not-implemented","analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-22T01:17:13.364Z"}