Custom attached property of ResourceDictionary with implicit declaration syntax?
问题 As you know a FrameworkElement has a property of type ResourceDictionary named Resources , in XAML we can declare it easily like this: <FrameworkElement.Resources> <SomeObject x:Key="someKey"/> <SomeOtherObject x:Key="someOtherKey"/> </FrameworkElement.Resources> It's some kind of implicit syntax, all the elements declared inside will be added to the ResourceDictionary . Now I would like to create an attached property having type of ResourceDictionary , of course a requirement of being