This page shows the posts published with the category 'WPF'

Subscribe to events launched by children of an ItemsControl

The ItemsControls (Listbox, Treeview, Menu, …) are often used. Sometimes you want to subscribe to the events of all their children. However this can be hard to set up especially when using binding. Fortunately there is a very easy solution (you could suspect it 😃). Simply change the style of the container (ItemsControl) and use the EventSetter tag: