0

I have a custom control with a collection-type field. When i run the app in debug mode and try to add items to the field, the XAML editor show the error:

Error XHR0015 Failed to add HelloItem to ObservableCollection`1. Unable to find element.

enter image description here

Why the error? How to solve the problem?

The source code: https://github.com/jhonToni/CustomComponentApp

jhon tonini
  • 67
  • 3
  • 7
  • According to the source code, I couldn't reproduce the issue. Could you please try your code again? And please provide a sample that reproduces the issue? – Jeaninez - MSFT Feb 07 '23 at 02:09
  • The issue occurs when i start the debug and i go to add a new HelloItem in XAML editor in runtime. – jhon tonini Feb 07 '23 at 07:33

1 Answers1

0

You couldn't add a new HelloItem in XAML editor in runtime. After you add a new HelloItem, you need to recompile it.

Jeaninez - MSFT
  • 3,210
  • 1
  • 5
  • 20