IEnumerable to typed Dictionary
If you know that ItemsSource is a dictionary then you can simply cast it into IDictionary and iterate it because you just need objects and it gives you exacly that:

var items = (IDictionary)ItemsSource;
foreach (var key in items.Keys)
{
    AddToItemsAndSelectionValues(key, items[key]);
}


You cast it into a concrete dictionary but you never use the types anyway so go directly with objects instead.

That's all. You don't need any of those ifs.