{"record":{"id":"399fa5b43e8d0231","repo":"HandyOrg/HandyControl","slug":"notsupportedexception-thicknesssplitconverter","errorCode":null,"errorMessage":"NotSupportedException","messagePattern":"NotSupportedException","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/Shared/HandyControl_Shared/Tools/Converter/ThicknessSplitConverter.cs","lineNumber":34,"sourceCode":"\n        var arr = str.Split(',');\n\n        if (arr.Length != 4)\n        {\n            return thickness;\n        }\n\n        return new Thickness(\n            left: double.TryParse(arr[0], out double leftTimes) ? leftTimes * thickness.Left : thickness.Left,\n            top: double.TryParse(arr[1], out double topTimes) ? topTimes * thickness.Top : thickness.Top,\n            right: double.TryParse(arr[2], out double rightTimes) ? rightTimes * thickness.Right : thickness.Right,\n            bottom: double.TryParse(arr[3], out double bottomTimes) ? bottomTimes * thickness.Bottom : thickness.Bottom\n        );\n    }\n\n    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\n    {\n        throw new NotSupportedException();\n    }\n}\n","sourceCodeStart":16,"sourceCodeEnd":37,"githubUrl":"https://github.com/HandyOrg/HandyControl/blob/2c0875ebd67326e0c67282967e3e809c69282fee/src/Shared/HandyControl_Shared/Tools/Converter/ThicknessSplitConverter.cs#L16-L37","documentation":"Thrown by ConvertBack to declare ThicknessSplitConverter forward-only: Convert multiplies each Thickness side by a factor parsed from a comma-separated parameter string, an operation with no unique inverse (the original factor and thickness cannot be recovered from the product). Any TwoWay or OneWayToSource binding that triggers reverse conversion hits this guard.","triggerScenarios":"Thrown at src/Shared/HandyControl_Shared/Tools/Converter/ThicknessSplitConverter.cs:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the converter exclusively in OneWay bindings so ConvertBack is never invoked","If a reverse path is needed, implement ConvertBack to divide each side by the same parsed factor instead of throwing","Return DependencyProperty.UnsetValue from ConvertBack for a graceful no-op when reverse updates should be ignored"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0875ebd67326e0c67282967e3e809c69282fee","analyzedAt":"2026-09-14T14:45:29.754Z","contentChangedAt":"2026-09-14T14:45:29.754Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}