dotnet/wpf · error · NotImplementedException
NotImplementedException (ConvertBack not supported)
Error message
NotImplementedException (ConvertBack not supported)
What it means
Fluent theme's AnimationFactorToValueConverter implements IMultiValueConverter but its ConvertBack deliberately throws NotImplementedException — round-tripping a bound value back to the animation factor is not supported. Data binding in TwoWay/OneWayToSource mode against this converter will crash the binding.
Solutions
- Set the binding Mode explicitly to OneWay so ConvertBack is never called.
- If a round-trip is needed, implement ConvertBack to compute the factor from the value or throw a NotSupportedException with a clear message.
- Use a different converter that supports TwoWay conversion.
Example fix
// before
<MultiBinding Converter="{StaticResource AnimationFactorToValueConverter}" Mode="TwoWay">
// after
<MultiBinding Converter="{StaticResource AnimationFactorToValueConverter}" Mode="OneWay"> Defensive patterns
Strategy: validation
Validate before calling
if (binding.Mode != BindingMode.OneWay)
throw new InvalidOperationException("AnimationFactorToValueConverter only supports OneWay bindings."); Try / catch
// ConvertBack is invoked inside the binding engine; guard at binding setup time
try { ApplyBinding(); }
catch (NotImplementedException ex) { log.LogError("Converter does not support ConvertBack"); } Prevention
- Default to Mode=OneWay when using theme-supplied converters.
- Read the converter implementation before using it in TwoWay bindings.
- Write unit tests that assert binding direction for each converter usage.
When it happens
Trigger: Using AnimationFactorToValueConverter in a MultiBinding with Mode=TwoWay or OneWayToSource, causing WPF to invoke ConvertBack.
Common situations: Developers binding animation progress factors back to source properties; copy-pasting a OneWay binding into TwoWay when refactoring; template re-targeting in the Fluent theme.
Related errors
- NotImplementedException (ConvertBack not supported)
- NotSupportedException (ConvertBack not supported)
- ArgumentNullException(nameof(value))
- InvalidEnumArgumentException(nameof(value)…
- new NotImplementedException()
AI-assisted analysis of dotnet/wpf@81131a70a4 (2026-09-14).
Data as JSON: /api/errors/d66498f81f1c9850.
Report an issue: GitHub.
Appendix: source
Thrown at src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Controls/AnimationFactorToValueConverter.cs:34
return 0.0;
}
if (values[1] is not double factor || factor == double.NaN)
{
return 0.0;
}
if (parameter is "negative")
{
factor = -factor;
}
return factor * completeValue;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
View on GitHub (pinned to 81131a70a4)