"wpf how to use a converter for child bindings of multibinding?" Code Answer

1

there is no need to check the targettype, just check the type of value passed into convert method.

public object convert(object value, type targettype, 
                      object parameter, system.globalization.cultureinfo culture)
{
    if (!(value is bool))
        throw new invalidoperationexception("value is not bool");

    return !(bool)value;
}
By Sam Phomsopha on August 16 2022

Answers related to “wpf how to use a converter for child bindings of multibinding?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.