Reference: StackLayout shift buttons - MediaPortal Wiki Related Mantis Bug (Original): 0003241: Auto placing of controls in grouped StackLayout - MediaPortal Bugtracker Changeset: https://github.com/MichelZ/MediaPortal-1/commit/d7f46f19d49f7be9a3f78e57487ef894688da3dc Pull Request: https://github.com/MediaPortal/MediaPortal-1/pull/6 If you use StackLayout with "Shift Buttons" enabled, the shifting always takes the size of the wrong control (size of the currently evaluated control), instead of the control which got hidden. This os course works when your controls are all the same size, but if they are not, you're screwed A simple Patch mitigates this Problem: In core/guilib/GUIGroup.cs: (This is an example for ShiftControlsLeft(int index), the patch is for ShiftControls Left/Right/Up/Down) Code (text): private void ShiftControlsLeft(int index) { int spacing = Spacing(System.Windows.Controls.Orientation.Horizontal); for (int i = index; i < Children.Count; i++) { if (i + 1 < Children.Count) { Children[i + 1].XPosition -= (Children[i].Width + spacing); } } } Code (text): Children[i + 1].XPosition -= (Children[i].Width + spacing); This changes the Position of the next control (i+1) by substracting the width of the currently evaluated control (i) However, it SHOULD substract the Width of the Control which has had it's visibility changed (index) So it should be: Code (text): Children[i + 1].XPosition -= (Children[index].Width + spacing); In full: Code (text): private void ShiftControlsLeft(int index) { int spacing = Spacing(System.Windows.Controls.Orientation.Horizontal); for (int i = index; i < Children.Count; i++) { if (i + 1 < Children.Count) { Children[i + 1].XPosition -= (Children[index].Width + spacing); } } }
In Mantis 0003801: AutoPlacing of controls for Group/StackLayout takes wrong width/height - MediaPortal Bugtracker
This is merged and will be included in 1.3.0Alpha. Thanks for the contribution and apologies for the late progress update.