In the forum it is recommended to use AnyComponents lists and blocks to not duplicate the same blocks. I needed a relationship between two elements. I came up with the idea to use a dictionary. I added the id of the buttons to the keys and added the arrangement id to the value. After pressing the button I wanted to change the color of the arrangement in the loop. But this is not important.
I noticed a problem. After adding button identifiers and arrangement to the dictionary, I compiled the application. Unfortunately, the application is damaged. Why can I add item ids to lists but not to the dictionary?