{"record":{"id":"4784f1a1de41511b","repo":"PrismLibrary/Prism","slug":"not-implemented","errorCode":null,"errorMessage":"Not implemented","messagePattern":"Not implemented","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"info","filePath":"src/Maui/Prism.Maui/Dialogs/RelativeContentSizeConverter.cs","lineNumber":39,"sourceCode":"            else\n            {\n                relativeSize = value;\n            }\n        }\n    }\n\n    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\n    {\n        var pageSize = double.Parse(value.ToString());\n        if (pageSize < 0)\n            return pageSize;\n\n        return RelativeSize * pageSize;\n    }\n\n    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\n    {\n        throw new NotImplementedException();\n    }\n}\n","sourceCodeStart":21,"sourceCodeEnd":42,"githubUrl":"https://github.com/PrismLibrary/Prism/blob/358118cd640d9a22ff8cf21c8ad197fa038b7990/src/Maui/Prism.Maui/Dialogs/RelativeContentSizeConverter.cs#L21-L42","documentation":"RelativeContentSizeConverter converts a RelativeSize to pixels for one-way sizing of dialogs; the reverse conversion has no meaningful implementation, so ConvertBack throws NotImplementedException. Two-way binding to a property using this converter is unsupported by design.","triggerScenarios":"Binding with Mode=TwoWay (or OneWayToSource) on a property whose Binding uses RelativeContentSizeConverter, causing WPF/MAUI to call ConvertBack.","commonSituations":"Copy-pasting a dialog XAML snippet and changing the size binding to TwoWay; applying the converter to an editable control's value (e.g. an Entry bound to the sized property); using the converter outside Prism's relative-size scenario.","solutions":["Change the binding to Mode=OneWay (the only supported direction for this converter).","Remove the converter from any editable/target-updating binding.","If reverse conversion is needed, write a custom IValueConverter implementing ConvertBack."],"exampleFix":"// before\n<BindableProperty Binding=\"{Binding Width, Converter={StaticResource RelativeContentSize}, Mode=TwoWay}\" />\n// after\n<BindableProperty Binding=\"{Binding Width, Converter={StaticResource RelativeContentSize}, Mode=OneWay}\" />","handlingStrategy":"validation","validationCode":"// audit bindings using the converter\nif (binding.Mode is BindingMode.TwoWay or BindingMode.OneWayToSource)\n    throw new InvalidOperationException(\"RelativeContentSizeConverter only supports OneWay\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always declare Mode=OneWay on bindings using RelativeContentSizeConverter.","Never attach this converter to editable controls.","Write a custom converter if two-way relative sizing is truly needed."],"tags":["prism","maui","converter","binding"],"backgroundTag":"method-not-implemented","analyzedSha":"358118cd640d9a22ff8cf21c8ad197fa038b7990","analyzedAt":"2026-09-15T15:00:31.079Z","contentChangedAt":"2026-09-15T15:00:31.079Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}