I have seen many times wpf code samples in this form:
<Window.Resources>
<DataTemplate DataType="{x:Type SomeType}">
<!-- Elements defining the DataTemplate-->
</DataTemplate>
</Window.Resources>
I understand the usage, but I cant understand why is this syntax is ok: since ResourceDictionary implements IDictionary, therefore every element that we add to Resource property must specify a key. Now I know that using the DictionaryKeyPropertyAttribute, a class can provide an implicit key value - but in case of DataTemplate class, the provided property is "DataTemplateKey". I know it sounds a bit petty, but the motivation for this question is to know how to use other classes even if I didnt have the privilege to see usage samples before (maybe some 3rd party...). anyone?
