I have dependency property in my UserControl "Menu":
internal static readonly DependencyProperty ActionProperty =
DependencyProperty.RegisterAttached(
"Action",
typeof(LetterAction),
typeof(Menu),
new FrameworkPropertyMetadata(LetterAction.None, ActionChanged));
I set this property into control:
<my:RibbonButton x:Name="buttonOpen" Label="Open" c:Menu.Action="Open" />
I want to take in my Menu control collection of controls which have Menu.Action. How can I do it without static collection?
P.S. It needs for subscribing on Click event of control that has setted Action property.