{"record":{"id":"498fe7805eacd5a1","repo":"unoplatform/uno","slug":"this-converter-does-not-use-any-parameters-you-sh","errorCode":null,"errorMessage":"This converter does not use any parameters. You should remove \"{parameter}\" passed as parameter.","messagePattern":"This converter does not use any parameters\\. You should remove \"(.+?)\" passed as parameter\\.","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/SamplesApp/SamplesApp.Samples/Windows_UI_Xaml_Controls/CommandBar/CommandBar_Native_With_AppBarButton_Binding.xaml.cs","lineNumber":46,"sourceCode":"\tpublic sealed partial class CommandBar_Native_With_AppBarButton_Binding : Page\n\t{\n\t\tpublic CommandBar_Native_With_AppBarButton_Binding()\n\t\t{\n\t\t\tthis.InitializeComponent();\n\t\t}\n\t}\n\n\tpublic class FromNullableBoolToCustomValueConverter : IValueConverter\n\t{\n\t\tpublic object NullOrFalseValue { get; set; }\n\n\t\tpublic object TrueValue { get; set; }\n\n\t\tpublic object Convert(object value, Type targetType, object parameter, string language)\n\t\t{\n\t\t\tif (parameter != null)\n\t\t\t{\n\t\t\t\tthrow new ArgumentException($\"This converter does not use any parameters. You should remove \\\"{parameter}\\\" passed as parameter.\");\n\t\t\t}\n\n\t\t\tif (value != null && !(value is bool))\n\t\t\t{\n\t\t\t\tthrow new ArgumentException($\"Value must either be null or of type bool. Got {value} ({value.GetType().FullName})\");\n\t\t\t}\n\n\t\t\tif (value == null || !System.Convert.ToBoolean(value, CultureInfo.InvariantCulture))\n\t\t\t{\n\t\t\t\treturn NullOrFalseValue;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn TrueValue;\n\t\t\t}\n\t\t}\n\n\t\tpublic object ConvertBack(object value, Type targetType, object parameter, string language)","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/unoplatform/uno/blob/04183404888ea21b4e5bfa3493e8d5f15e972c3a/src/SamplesApp/SamplesApp.Samples/Windows_UI_Xaml_Controls/CommandBar/CommandBar_Native_With_AppBarButton_Binding.xaml.cs#L28-L64","documentation":"Thrown by FromNullableBoolToCustomValueConverter.Convert when a ConverterParameter was supplied in the XAML binding. The converter ignores parameters by design, so any non-null parameter is treated as a programmer error rather than silently dropped.","triggerScenarios":"XAML binding like {Binding IsOn, Converter={StaticResource C}, ConverterParameter=Foo} passes 'Foo' as parameter, which the Convert method rejects at the top.","commonSituations":"Copy-pasting a binding from a converter that does take a parameter (e.g. a visibility converter) into one that doesn't; leftover ConverterParameter from refactoring; misunderstanding which converter is being used.","solutions":["Remove the ConverterParameter=... from the XAML binding that uses this converter.","If you need parameterized behavior, use a different converter that supports it, or add a property to the converter and set it as a resource.","Search the XAML for the converter's StaticResource key and audit every usage."],"exampleFix":"<!-- before -->\n<Binding Path=\"IsOn\" Converter=\"{StaticResource FromNullableBoolToCustomValue}\" ConverterParameter=\"Foo\" />\n<!-- after -->\n<Binding Path=\"IsOn\" Converter=\"{StaticResource FromNullableBoolToCustomValue}\" />","handlingStrategy":"validation","validationCode":"<!-- In XAML, ensure the binding has no ConverterParameter -->\n<!-- Use a static check: grep the page for 'ConverterParameter' on this converter's bindings -->","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Document converters that take no parameter and audit XAML for stray ConverterParameter.","Use distinct resource keys so the right converter is obvious in bindings.","Add an XML doc comment on the converter class stating 'no ConverterParameter'."],"tags":["xaml","binding","converter","samples"],"backgroundTag":null,"analyzedSha":"04183404888ea21b4e5bfa3493e8d5f15e972c3a","analyzedAt":"2026-08-13T21:08:11.651Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}