I'm looking for a way to essentially give an item in a ResourceDictionary
multiple keys. Is there a way to do this?
<DataTemplate x:Key="myTemplate" ... />
<AliasedResource x:Key="myTemplateViaAlias" Target="myTemplate" OR_Target={StaticResource myTemplate} />
When I call TryFindResource("myTemplateViaAlias")
I want to get myTemplate out. I suppose I could create an AliasedResource
class myself and dereference it in code when I get it out of the dictionary, but I'd rather not do that if there's a built-in way.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…