No more than 3 items in stackpanel?

Ribbon for WPF Forum

Posted 16 years ago by Francesco De Vittori
Version: 3.0.0410
Avatar
Hi,
we just upgraded to 3.0.410 from 1.0.0347.

I had a stackpanel in my ribbon with 4 items, but all of a sudden the fourth button was not displayed.
After a lot of head scratching I found that the problem was not in my button but it's the stackpanel that does not show more than 3 items, so a lot of other tabs in our ribbon are "truncated".
(From stackpanel doc: "Stack panels normally show three child controls ")

Is there a reason for this change?
Why it's not documented in the release history? (sorry if it's there and I did not see it).

Comments (3)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Francesco,

StackPanels were never intended to have more than 3 items in them, even in the original v1.0 implementation of them. We didn't think anyone had done that, so that is why there was no mention of the change. I believe the Microsoft specs only want you to have 3 items maximum in a vertical stack.

Email us a screenshot of what you were trying to do and describe if you had wanted variant changes with it or were just doing a vertical stack of items so we can discuss some more. Thanks!


Actipro Software Support

Posted 16 years ago by Francesco De Vittori
Avatar
It definitely makes sense.
My mistake was to use stackpanels everywhere inside Groups, but with horizontal orientation: I didn't realize that in order to simply put controls in a row you don't need another container inside a Group.
Given that the goal of the stackpanel si to stack objects vertically, as you said it makes no sense to put in more than three controls.

Thanks for the clarification,

Francesco
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Oh good, I'm glad it will work out for you. Also it is important to note that a major new feature of v3.0 is that you can put any type of control in the ribbon Groups, not just our ribbon controls. For example, one of the QuickStarts shows embedding a MediaElement right in as a child of a Group so it can show a video.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.