I'm trying to achieve something where the Headers for RadMenuItems in my RadContextMenu are selected from a static resource, the key of which derives from a binding. This will allow me to have an ItemsSource of ICommands, and for each, select a different text for the Header based on a key property I expose on my custom ICommands.
I'm using at attached DependencyProperty, so I have access to the RadMenuItem as a DependencyObject when the DynamicProperty is changed. However, when I try to access the my resource out of the Resources property of my RadMenuItem, it doesn't exist (I get null).
Yet if I remove my attached DynamicProperty and just bind the header (Header="{Binding Source={StaticResource MyKey}}"), the RadMenuItem is able to find the key.
Is there a way to programatically "find" a resource, starting from a RadMenuItem?