Untitled

 avatar
unknown
plain_text
14 days ago
2.9 kB
5
Indexable
 That AVLN2000 error means Avalonia cannot resolve the type BooleanToCollapsingVisibilityConverter from the clr-namespace:Avaya.UCC.UI.Converters.

πŸ“› Error details:

AVLN2000: Unable to resolve type BooleanToCollapsingVisibilityConverter from namespace clr-namespace:Avaya.UCC.UI.Converters
This error is pointing at this line:


<converters:BooleanToCollapsingVisibilityConverter x:Key="OurVisibilityConverter" Link="{StaticResource OppositeConverter}"/>

βœ” 1. Check the C# file
Make sure this class actually exists in your codebase under the declared namespace:

πŸ“„ Avaya.UCC.UI.Converters.BooleanToCollapsingVisibilityConverter

namespace Avaya.UCC.UI.Converters
{
    public class BooleanToCollapsingVisibilityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is bool b)
                return b ? Visibility.Visible : Visibility.Collapsed;
            return Visibility.Collapsed;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value is Visibility v && v == Visibility.Visible;
        }
    }
}
If it’s missing, you need to add this class.

βœ” 2. Check the xmlns:converters declaration in your XAML
Make sure at the top of your XAML file you have:
xmlns:converters="clr-namespace:Avaya.UCC.UI.Converters;assembly=Avaya.UCC.UI"
Make sure:

Avaya.UCC.UI.Converters matches the namespace of your C# file
Avaya.UCC.UI matches the assembly name in your .csproj
⚠ You can confirm the assembly name by checking:


<PropertyGroup>
  <AssemblyName>Avaya.UCC.UI</AssemblyName>
</PropertyGroup>


βœ” 3. Rebuild your project
Sometimes this error is due to XAML analyzer not picking up types from newly added classes. Do a Clean + Rebuild.

βœ” 4. Remove invalid property if needed
This part:
Link="{StaticResource OppositeConverter}"

is suspicious β€” Link is not a property of BooleanToCollapsingVisibilityConverter unless you implemented it yourself.

If you don’t have a Link property in the converter class, remove it:

<converters:BooleanToCollapsingVisibilityConverter x:Key="OurVisibilityConverter"/>
Or, if you need it (e.g., you have a Link property of type IValueConverter in your class), make sure it exists in the converter class:

public IValueConverter Link { get; set; }
Otherwise, that Link=... line alone could trigger the AVLN2000.

βœ… Summary Checklist:
Step	What to check
βœ” Class exists	BooleanToCollapsingVisibilityConverter.cs under correct namespace
βœ” XAML namespace	xmlns:converters="clr-namespace:Avaya.UCC.UI.Converters;assembly=Avaya.UCC.UI"
βœ” Assembly name	Confirm in .csproj
βœ” Remove invalid Link prop	If Link is not a real property on the converter
βœ” Clean + Rebuild	Helps XAML resolver detect type correctly
Editor is loading...
Leave a Comment