As you mentioned in your question, records without the x:Key attribute use the DataTemplateKey (SomeType) as the key. You can specify only one such instance for a specific SomeType in resources. The DataTemplateKey is derived from the TemplateKey , which itself is derived from the ResourceKey . Of course, such DataTemplate resource definitions can be displayed for many types, remaining unique, since the DataTemplateKey of each corresponding type will be unique.
For example, consider the following Resource Definition:
<Window.Resources> <DataTemplate DataType="{x:Type Button}"> </DataTemplate> <DataTemplate DataType="{x:Type TextBlock}"> </DataTemplate> <DataTemplate x:Key="SpecialButton" DataType="{x:Type Button}"> </DataTemplate> </Window.Resources>
The result is three entries in the resource dictionary. The orange arrows in the image below indicate DataTemplateKey entries for the Button and TextBlock types, while the red arrow indicates a specific record (key) for the SpecialButton resource:

source share