Why ZIndex is not considered in arrange override of a stackpanel
问题 Here is what I tried to to: Added a stackpanel to my window (Orientation: Horizontal) Added a set of buttons to it Set the first button's ZIndex to be higher than the second one Increased the width of the first button What I expected: I expected the first button to be on top of the second button (atlest overlay) StackPanel's width should not change unless the width of the first button is no more sufficient What is happening actually: First button's width increases and the second button moves