{"record":{"id":"6b4bf096eb9e3479","repo":"dotnet/wpf","slug":"sr-multibindinghasnoconverter","errorCode":null,"errorMessage":"SR.MultiBindingHasNoConverter","messagePattern":"SR\\.MultiBindingHasNoConverter","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/MultiBinding.cs","lineNumber":341,"sourceCode":"                ChangeFlag(BindingFlags.ValidatesOnNotifyDataErrors, value);\n            }\n        }\n    }\n\n    //------------------------------------------------------\n    //\n    //  Protected Methods\n    //\n    //------------------------------------------------------\n\n    /// <summary>\n    /// Create an appropriate expression for this Binding, to be attached\n    /// to the given DependencyProperty on the given DependencyObject.\n    /// </summary>\n    internal override BindingExpressionBase CreateBindingExpressionOverride(DependencyObject target, DependencyProperty dp, BindingExpressionBase owner)\n    {\n        if (Converter == null && String.IsNullOrEmpty(StringFormat))\n            throw new InvalidOperationException(SR.MultiBindingHasNoConverter);\n\n        for (int i = 0; i < Bindings.Count; ++i)\n        {\n            CheckTrigger(Bindings[i]);\n        }\n\n        return MultiBindingExpression.CreateBindingExpression(target, dp, this, owner);\n    }\n\n    internal override ValidationRule LookupValidationRule(Type type)\n    {\n        return LookupValidationRule(type, ValidationRulesInternal);\n    }\n\n    //------------------------------------------------------\n    //\n    //  Internal Methods\n    //","sourceCodeStart":323,"sourceCodeEnd":359,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Data/MultiBinding.cs#L323-L359","documentation":"MultiBinding throws InvalidOperationException when it has neither a Converter nor a StringFormat. Without a converter, WPF cannot combine the values of the child bindings into a single target value, so the binding expression cannot be created.","triggerScenarios":"Using <MultiBinding> with only child <Binding> elements and no Converter property and no StringFormat; setting MultiBinding.Converter to null and StringFormat to empty at runtime before attaching the binding.","commonSituations":"Forgetting Converter when a multi-binding is first written in XAML; a converter resource fails to resolve (StaticResource returns null) so Converter stays null; default TwoWay multi-bindings where IMultiValueConverter is required.","solutions":["Set a Converter (an IMultiValueConverter implementation) on the MultiBinding","Or set StringFormat (e.g. StringFormat=\"{}{0} {1}\") if a format is sufficient","Verify the converter StaticResource resolved to a non-null IMultiValueConverter"],"exampleFix":"<!-- before -->\n<MultiBinding>\n  <Binding Path=\"First\"/>\n  <Binding Path=\"Last\"/>\n</MultiBinding>\n<!-- after -->\n<MultiBinding Converter=\"{StaticResource nameConverter}\">\n  <Binding Path=\"First\"/>\n  <Binding Path=\"Last\"/>\n</MultiBinding>","handlingStrategy":"validation","validationCode":"if (multiBinding.Converter == null && string.IsNullOrEmpty(multiBinding.StringFormat)) throw new InvalidOperationException(\"MultiBinding needs a Converter or StringFormat\");","typeGuard":null,"tryCatchPattern":"try { BindingOperations.SetBinding(t, p, multiBinding); } catch (InvalidOperationException) { /* add converter */ }","preventionTips":["Always supply an IMultiValueConverter on MultiBinding unless StringFormat suffices","Check that converter StaticResources resolve to non-null","Review new multi-bindings in code review for missing converters"],"tags":["wpf","multibinding","converter","xaml"],"backgroundTag":"missing-required-config-field","analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-21T21:30:21.729Z"}