Completed
Last Updated: 21 Dec 2023 13:19 by ADMIN
Release 6.6.0
Gabriel
Created on: 20 Nov 2023 08:33
Category: ComboBox
Type: Bug Report
0
ComboBox: [MacCatalyst] InvalidOperationException when trying to open the dropdown in ListView or CollectionView
If a RadComboBox is used as an ItemTemplate for a ListView or CollectionView on MacCatalyst, the application crashes every time you attempt to open the dropdown with the following exception:

System.InvalidOperationException: Event registration is overwriting existing delegate. Either just use events or your own delegate: Microsoft.Maui.Controls.Handlers.Items.ReorderableItemsViewDelegator`2[Microsoft.Maui.Controls.ReorderableItemsView,Microsoft.Maui.Controls.Handlers.Items.ReorderableItemsViewController`1[Microsoft.Maui.Controls.ReorderableItemsView]] UIKit.UIScrollView+_UIScrollViewDelegate
   at UIKit.UIApplication.EnsureEventAndDelegateAreNotMismatched(Object del, Type expectedType)
   at UIKit.UIScrollView.EnsureUIScrollViewDelegate()
   at UIKit.UIScrollView.add_Scrolled(EventHandler value)
   at Telerik.Maui.Controls.RadPopup.SetPopupIsOpen(Boolean value)
   at Telerik.Maui.Controls.RadPopup.UpdatePopup()
..................
1 comment
ADMIN
Didi
Posted on: 20 Nov 2023 08:43

Workaround: 

Inside the AppDelegate.cs file set the CheckForEventAndDelegateMismatches to false:

using Foundation;
using UIKit;
namespace TelerikComboboxBug;

[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
    protected override MauiApp CreateMauiApp() {
        UIApplication.CheckForEventAndDelegateMismatches = false;
        return MauiProgram.CreateMauiApp();
    }
}

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com