Attached property cannot be created in XAML from designer property window when assigned a TypeConverter

I have a working attached property defined like below

    public static class UiExt
    {
        public static readonly DependencyProperty UiDataProperty = DependencyProperty.RegisterAttached(
                  "UiData",
                  typeof(UiControlData),
                  typeof(UiExt),
                    new PropertyMetadata(null));
    
        [System.ComponentModel.Description("Connection informations")]
        [AttachedPropertyBrowsableForType(typeof(UIElement))]
        
        public static UiControlData GetUiData(DependencyObject d)
        {
            return (UiControlData)d.GetValue(UiDataProperty);
        }
    
        public static void SetUiData(DependencyObject d, UiControlData value)
        {
            d.SetValue(UiDataProperty, value);
        }
    
    }

The propertie is of type UiControlData which is an object

 public class UiControlData
 {
     public UiControlData()
     {
             
     }
     public string Address { get; set; }

     /// <summary>
     /// Id of the connector as declared in the connector table
     /// </summary>
     public string ConnectorId { get; set; }
     public string VariableId { get; set; } = string.Empty;
     public bool IsNotificationEnabled { get; set; } = true;

     public bool IsOneWay { get; set; } = false; // for now only for comboboxes -> notification will be disabled for items and values but still there for enable / visible, will do a synchro read at init 

 }

When I am in Visual Studio Designer I am able to create the object from the property editor like this with the New button

and then if I select the property in the XAML I have the correct sub properties

I want to have more control on what is displayed, for example hide some sub properties depending on the type of the UiElement so I created a TypeConverter and when I set it as attribute of my object with ([TypeConverter(typeof(MyComplexObjectConverter))]) the New button from the Visual Studio Designer disappear. I have just set a simple TypeConverter to give a minimal example and the problem is the same

public class MyComplexObjectConverter : ExpandableObjectConverter
{
    public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
    {
        if (sourceType == typeof(string) || sourceType == typeof(UiControlData))
        {
            return true;
        }
        return base.CanConvertFrom(context, sourceType);
    }

    public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
    {
        if (value == null)
        {
            return null;
        }
        if (value is string)
        {
            return new UiControlData();
        }
        if (value is UiControlData)
        {
            return value;
        }
        return base.ConvertFrom(context, culture, value);
    }

    public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
    {
        PropertyDescriptorCollection originalProperties = base.GetProperties(context, value, attributes);
        return originalProperties;
    }
}

I tried to debug the designer by attaching another Visual Studio to WpfSurface and it looks like the convert functions are not called. So I must be missing something.

I also tried to add some more attributes to the Get function of the attached property like this one [System.ComponentModel.TypeConverter(typeof(MyComplexObjectConverter))] but the behaviour did not change.

What can I try / test more ?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật