StackPanel RowAlignment does not honor collapsed child controls.

Ribbon for WPF Forum

Posted 4 months ago by rex hui
Version: 19.1.0681
Platform: .NET 4.8
Environment: Windows 10 (64-bit)
Avatar
<ribbon:StackPanel ItemVariantBehavior="MediumThenSmallWhenSmall" RowAlignment="Center">
 <ribbon:Button Id="EditCut" Visibility="Collapsed" />
 <ribbon:Button Id="EditCopy"/>
 <ribbon:Button Id="EditSelectAll"/>
</ribbon:StackPanel>

RowAlignment "center" should handle collapsed child as nonexisting when calculating the layout.

Comments (1)

Posted 4 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Rex,

Per Microsoft's specifications that was part of their licensing for use of ribbon-based UI, they did not allow for individual controls to be dynamically collapsed like that.  All controls on the ribbon are supposed to be visible and only hidden by group variants as the width decreases.  To adhere to those guidelines, you should disable the Cut button instead of collapsing it if you don't want its functionality available.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) 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.