Question may be phrased wrong and I'm sorry for that.
I have a grid filled with with rectangles. These rectangles are created with C# when the application is started.
I know how to create OnClick Event with the help of XAML, however, my problem is that I don't know how to do one that's created via C# after application has started.