Untitled
unknown
plain_text
8 months ago
2.9 kB
8
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 correctlyEditor is loading...
Leave a Comment