{"record":{"id":"a0fb164ba28d0b4c","repo":"stride3d/stride","slug":"property-unsupported-by-method-updatevaluefromcomponent","errorCode":null,"errorMessage":"Property unsupported by method UpdateValueFromComponent.","messagePattern":"Property unsupported by method UpdateValueFromComponent\\.","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"sources/presentation/Stride.Core.Presentation.Wpf/Controls/AngleEditor.cs","lineNumber":54,"sourceCode":"            Value = DefaultValue;\n        }\n\n        /// <inheritdoc/>\n        protected override void UpdateComponentsFromValue(float value)\n        {\n            var degrees = GetDisplayValue(value);\n            SetCurrentValue(DegreesProperty, degrees);\n        }\n\n        /// <inheritdoc/>\n        protected override float UpdateValueFromComponent(DependencyProperty property)\n        {\n            if (property == DegreesProperty)\n            {\n                return MathUtil.DegreesToRadians(Degrees);\n            }\n\n            throw new ArgumentException(\"Property unsupported by method UpdateValueFromComponent.\");\n        }\n\n        /// <inheritdoc/>\n        protected override float UpdateValueFromFloat(float value)\n        {\n            return MathUtil.DegreesToRadians(value);\n        }\n\n        /// <summary>\n        /// Converts radians to degrees for display.\n        /// </summary>\n        /// <param name=\"angleRadians\">The angle in radians.</param>\n        /// <returns>The angle in degrees.</returns>\n        private static float GetDisplayValue(float angleRadians)\n        {\n            return MathF.Round(MathUtil.RadiansToDegrees(angleRadians), 4);\n        }\n    }","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/presentation/Stride.Core.Presentation.Wpf/Controls/AngleEditor.cs#L36-L72","documentation":"AngleEditor's UpdateValueFromComponent maps one of its component dependency properties (e.g. Degrees) to the underlying radians value; any other property reaching the method hits the fall-through ArgumentException. It indicates an internal dispatch bug: a property change was routed to a method that doesn't handle it.","triggerScenarios":"Internal property-change routing invoking UpdateValueFromComponent with a DependencyProperty other than DegreesProperty — typically from adding a new bindable component property to AngleEditor without extending the switch.","commonSituations":"Modifying/deriving AngleEditor with extra component properties; library-internal invariant break after Stride editor upgrades.","solutions":["If you modified or derived AngleEditor, add a branch for the new property before the throw.","If unmodified, file/inspect a Stride bug — the editor routed an unhandled property; verify Stride version and update.","Work around by binding only the documented Degrees property."],"exampleFix":"// before\nif (property == DegreesProperty)\n    return MathUtil.DegreesToRadians(Degrees);\nthrow new ArgumentException(\"Property unsupported by method UpdateValueFromComponent.\");\n// after\nif (property == DegreesProperty)\n    return MathUtil.DegreesToRadians(Degrees);\nif (property == RadiansProperty)\n    return Radians;\nthrow new ArgumentException(\"Property unsupported by method UpdateValueFromComponent.\");","handlingStrategy":"try-catch","validationCode":"if (property != AngleEditor.DegreesProperty) { log.Warn(\"Unhandled property routed to AngleEditor\"); return; }","typeGuard":null,"tryCatchPattern":"try { editor.UpdateValueFromComponent(property); }\ncatch (ArgumentException ex) { log.Error(\"AngleEditor received unsupported property\", ex); }","preventionTips":["Don't reroute additional dependency properties into UpdateValueFromComponent when subclassing.","Add a branch for any new component property before shipping.","Keep AngleEditor unmodified and bind only the documented Degrees property."],"tags":["wpf","internal-invariant","property-dispatch"],"backgroundTag":"internal-invariant-violation","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}