Is there a way to change the drawing order in WPF

Is there a way to change the output order of controls in a StackPanel without changing the actual ordering of these controls in a StackPanel?

The reason I ask is because there is a button bar between the buttons with a field of 0. The active button increases (i.e., the margin is set to -10), overlapping adjacent buttons. The problem here is that the right button is drawn later and thus is drawn on top instead of the active button.

I'm afraid I will need to create a custom grid-based control.

+5
source share
1 answer
+7