

In my ‘Overview of Resources in WPF’ article I talked about Resources and how they are useful. But there is one drawback with ‘Resources’ in WPF. Resource collection of each element contains individual objects and you need to refer them separately to apply them.

Recently in our project, which is based on WPF framework, we wanted to use ItemsControl to list out different types of objects. I couldn’t use general List, ObservableCollection or any other type of collection for that matter to set ItemSource of ItemsControl, since they restrict only one type of object. Thus, I searched on the internet and found out about CompositeCollection. In this article I am going to explain how to use CompositeCollection to list out different types of objects in WPF.

Resources in WPF are set of objects like Brushes, Templates, styles etc. which are stored in Dictionary and referenced by unique strings. Usually they are declared once and used throughout the application. They are like CSS (Cascading Style Sheets) used in styling Web Pages.

In this article, you will learn about custom MarkupExtesion for binding enum to ComboBox in WPF.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyWrite an article and earn +1,000 SHARP when it is approved.
Write an article