{"record":{"id":"0385c58ee093234f","repo":"unoplatform/uno","slug":"this-converter-does-not-use-any-parameters-you-sh-0385c5","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":"validation","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Views/Converters/FromNullableBoolToReverseBoolConverter.cs","lineNumber":17,"sourceCode":"﻿using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Text;\nusing Microsoft.UI.Xaml;\nusing Microsoft.UI.Xaml.Data;\nusing Microsoft.UI.Xaml.Media;\n\nnamespace Uno.UI.Samples.Converters\n{\n\tpublic class FromNullableBoolToReverseBoolConverter : IValueConverter\n\t{\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\tvar valueToConvert = value != null && System.Convert.ToBoolean(value, CultureInfo.InvariantCulture);\n\n\t\t\treturn !valueToConvert;\n\t\t}\n\n\t\tpublic object ConvertBack(object value, Type targetType, object parameter, string language)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\t}\n}","sourceCodeStart":1,"sourceCodeEnd":35,"githubUrl":"https://github.com/unoplatform/uno/blob/04183404888ea21b4e5bfa3493e8d5f15e972c3a/src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Views/Converters/FromNullableBoolToReverseBoolConverter.cs#L1-L35","documentation":"FromNullableBoolToReverseBoolConverter.Convert rejects a non-null ConverterParameter, mirroring the family's no-parameter convention. This converter inverts a nullable bool.","triggerScenarios":"Supplying ConverterParameter in a binding that uses this reverse converter.","commonSituations":"Copy-paste from a parameterized converter; leftover parameter after refactor.","solutions":["Remove ConverterParameter from the binding.","Use a parameter-aware converter if parameterization is needed."],"exampleFix":"<!-- before -->\n{Binding Flag, Converter={StaticResource Rev}, ConverterParameter=\"1\"}\n<!-- after -->\n{Binding Flag, Converter={StaticResource Rev}}","handlingStrategy":"validation","validationCode":"<!-- Ensure no ConverterParameter on bindings using this converter -->","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Mark this converter class as 'no ConverterParameter' in comments.","Audit test bindings for stray parameters."],"tags":["xaml","binding","converter","unit-tests","samples"],"backgroundTag":null,"analyzedSha":"04183404888ea21b4e5bfa3493e8d5f15e972c3a","analyzedAt":"2026-08-13T21:08:11.651Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}