I have a wrap panel that contains several dockpanels, and I need each dockpanel to change its background by hovering the mouse over it. I think creating a trigger for each element would not be appropriate. My sham is like this:
<StackPanel>
<WrapPanel>
<DockPanel> <!-- Aqui eu tenho muitos DockPanels -->
</DockPanel>
</WrapPanel
</StackPanel>
What I was able to do was fetch all child elements using:
Children.OfType<DockPanel>().Any();
But I can not define which object the mouse is on top to change it