{"record":{"id":"3ad708655dff166d","repo":"stride3d/stride","slug":"no-multi-value-converter-has-been-set","errorCode":null,"errorMessage":"No multi value converter has been set.","messagePattern":"No multi value converter has been set\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/presentation/Stride.Core.Presentation.Wpf/ValueConverters/MultiChained.cs","lineNumber":278,"sourceCode":"        /// Gets or sets the target type of the seventh converter to chain.\n        /// </summary>\n        public Type TargetType7 { get { return chainedConverter.TargetType7; } set { chainedConverter.TargetType7 = value; } }\n        /// <summary>\n        /// Gets or sets the target type of the eighth converter to chain.\n        /// </summary>\n        public Type TargetType8 { get { return chainedConverter.TargetType8; } set { chainedConverter.TargetType8 = value; } }\n\n        /// <inheritdoc/>\n        [NotNull]\n        public override object ProvideValue(IServiceProvider serviceProvider)\n        {\n            return this;\n        }\n\n        /// <inheritdoc/>\n        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)\n        {\n            if (MultiConverter == null) throw new InvalidOperationException(\"No multi value converter has been set.\");\n            var result = MultiConverter.Convert(values, MultiConverterTargetType ?? typeof(object), MultiConverterParameter, culture);\n            return chainedConverter.Convert(result, targetType, parameter, culture);\n        }\n\n        /// <inheritdoc/>\n        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)\n        {\n            if (MultiConverter == null) throw new InvalidOperationException(\"No multi value converter has been set.\");\n            var result = chainedConverter.ConvertBack(value, MultiConverterTargetType ?? typeof(object), parameter, culture);\n            return MultiConverter.ConvertBack(result, targetTypes, MultiConverterParameter, culture);\n        }\n    }\n}\n","sourceCodeStart":260,"sourceCodeEnd":292,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/presentation/Stride.Core.Presentation.Wpf/ValueConverters/MultiChained.cs#L260-L292","documentation":"MultiChained.Convert first delegates to an inner IMultiValueConverter stored in the MultiConverter property. If that property was never set, there is no converter to call, so the method throws InvalidOperationException. The chained converter requires this wiring before use.","triggerScenarios":"Instantiating MultiChained (or using it in XAML) without assigning its MultiConverter property, then a binding evaluation triggers Convert(object[], ...).","commonSituations":"XAML resource declared without setting MultiConverter; code constructing MultiChained and forgetting the property; refactoring removed the initialization.","solutions":["Set the MultiConverter property before the binding is evaluated.","Initialize MultiConverter in the constructor or via XAML property element syntax.","Verify the resource declaration in XAML includes the inner converter."],"exampleFix":"// before\nvar chained = new MultiChained { ChainedConverter = new BoolToVisibilityConverter() };\n// after\nvar chained = new MultiChained { MultiConverter = new MyMultiConverter(), ChainedConverter = new BoolToVisibilityConverter() };","handlingStrategy":"validation","validationCode":"// C# - check before use\nif (multiChained.MultiConverter == null) throw new InvalidOperationException(\"Configure MultiConverter first\");","typeGuard":"static bool IsConfigured(MultiChained c) => c?.MultiConverter != null;","tryCatchPattern":"try { result = chained.Convert(values, targetType, param, culture); } catch (InvalidOperationException ex) { /* log misconfigured converter */ }","preventionTips":["Initialize MultiConverter in the constructor","Declare inner converter in XAML resource alongside the chained one","Add an assertion in a debug-only self-check"],"tags":["wpf","multibinding","invalid-operation","initialization"],"backgroundTag":"missing-dependency","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"}