Closed nishy2000 closed 3 years ago
Changing that behavior is like opening pandoras box. If we support it in this case, we have to support it everywhere. I don't see the benefit of adding panels as content of the RibbonGroupBox.
What would be the use case for using a panel inside an itemscontrol?
One possible use is when we want to use a different layouter than the RibbonGroupBoxWrapPanel layouter only for specific controls. Of course, I understand that we can do something similar with RibbonToolBar.
However, in the process of implementing the simplified ribbon feature, I investigated the Fluent.Ribbon.Showcase sample code. And I found the code using StackPanel in RibbonGroupBox. It is the Test RibbonGroupBox in the Instert RibbonTabItem in TestContent.xaml. So, I thought that it was necessary to support the Panel control in RibbonGroupBox even with the simplified ribbon feature.
But some existing code was not able to support the Panel control in RibbonGroupBox, so I suggested a fix.
If Fluent.Ribbon don't support Panel controls in RibbonGroupBox, I think that it is better not to have StackPanel in the sample code.
Shall I withdraw this proposal?
(I'm not very good at English. I apologize if the explanation is difficult to understand.)
No worries about your english. I have no real issues understanding you, even though i am not a native speaker myself. ;-)
The showcase contains code with a custom panel just to make sure it's rendered at all. Fully supporting custom panels would, most likely, require more work than just the changes you made. So i don't think it's worth the effort as no one ever asked for such a support.
I see. How should I handle this issue and PR?
Let me think about it a few days. Maybe i can play around with custom panels during the weekend, determine what else would have to be changed and if it's worth the effort.
Size value calculated by RibbonGroupBox is not reflected in RibbonControls in Panel control
I found in the sample code that is used StackPanel as a child control of RibbonGroupBox. So I think that RibbonGroupBox supports Panel control as a child control.
RibbonGroupBox sets the Size value calculated from State property to Size property of the child controls. However, I found that the size value was set for the direct child's RibbonControls, but it was not reflected in the RibbonControls in the Panel.
I think that the size value also have to be set for the RibbonControls in Panel control.
How to reproduce this issue:
Environment