stride3d/stride · error · ArgumentException
The parameter of this converter must be convertible to a…
Error message
The parameter of this converter must be convertible to a double.
What it means
Multiply.Convert requires the converter parameter to be convertible to a double via ConverterHelper.ConvertToDouble. When the parameter is a non-numeric type or an unparsable string, the underlying exception is wrapped in an ArgumentException indicating the parameter is at fault.
Solutions
- Set ConverterParameter to a valid numeric string, e.g. ConverterParameter="1.5".
- Use invariant decimal point format (.) in XAML parameters.
- Pass the parameter programmatically as a double when constructing the binding in code.
Example fix
<!-- before -->
<Binding Converter="{StaticResource multiply}" ConverterParameter="1,5"/>
<!-- after -->
<Binding Converter="{StaticResource multiply}" ConverterParameter="1.5"/> Defensive patterns
Strategy: validation
Validate before calling
bool isValidParameter(object? p) => p is double || p is int || (p is string s && double.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out _));
Try / catch
try { result = multiply.Convert(value, targetType, parameter, culture); } catch (ArgumentException) { result = DependencyProperty.UnsetValue; } Prevention
- Always use invariant decimal point (.) in ConverterParameter strings
- Quote numeric parameters in XAML to avoid culture surprises
- Prefer code-created bindings with typed double parameters for dynamic values
When it happens
Trigger: ConverterParameter set to a non-numeric string in XAML (e.g. ConverterParameter="scale"), or a parameter object whose type ConvertToDouble cannot handle.
Common situations: Typos in XAML ConverterParameter (text where a number was intended); culture-sensitive decimal commas in XAML attributes; forgetting that ConverterParameter is a string in XAML.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- The value of this converter must be convertible to a double.
- Converter is not null but previous Converter was null
- Converter is null but following Converter is not null
- Requested conversion is not supported.
- The generic argument of this class must be the type being…
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/3a22f332b1b1a88b.
Report an issue: GitHub.
Appendix: source
Thrown at sources/presentation/Stride.Core.Presentation.Wpf/ValueConverters/Multiply.cs:37
{
double scalar;
try
{
scalar = ConverterHelper.ConvertToDouble(value, culture);
}
catch (Exception exception)
{
throw new ArgumentException("The value of this converter must be convertible to a double.", exception);
}
double param;
try
{
param = ConverterHelper.ConvertToDouble(parameter, culture);
}
catch (Exception exception)
{
throw new ArgumentException("The parameter of this converter must be convertible to a double.", exception);
}
return System.Convert.ChangeType(scalar * param, targetType);
}
/// <inheritdoc/>
public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
double scalar;
try
{
scalar = ConverterHelper.ConvertToDouble(value, culture);
}
catch (Exception exception)
{
throw new ArgumentException("The value of this converter must be convertible to a double.", exception);
}
View on GitHub (pinned to 96fad776d2)