Force bars Button To Use No Image Irrespective of Layout

Bars for WPF Forum

The latest build of this product (v24.1.5) was released 2 months ago, which was before this thread was created.
Posted 5 days ago by Miles Merckel
Version: 24.1.5
Avatar

Hi

I’ve got a BarSplitButton on a bars ribbon, I’ve set the label to some text but haven’t set the small or large image source as I only ever want text on the button.


When the ribbon is set to “Simplified Ribbon” all is good only the text is displayed but when the ribbon is set to “Classic Ribbon” it also displays the fallback blue dot image. Is there a way to force no image displayed at all irrespective of the ribbon layout?


I’ve tried changing the button variant size but to no avail.

Thanks

Miles

Comments (3)

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

Hi Miles,

A large-sized BarSplitButton is always going to show an image, using the fallback one as needed since otherwise you end up with blank space where the image would be.  I don't believe that a medium/small-sized BarSplitButton will show an image if a Label is provided.

For instance, I don't see a fallback image displayed with this XAML:

<bars:RibbonGroup Key="Group">
	<bars:RibbonControlGroup ItemVariantBehavior="AlwaysMedium">
		<bars:BarSplitButton Label="No Image" />
	</bars:RibbonControlGroup>	
</bars:RibbonGroup>


Actipro Software Support

Posted 4 days ago by Miles Merckel
Avatar

Thanks that fixed the fallback image removal but with four buttons it placed them in a wrap panel arrangement of two columns and three rows on an extra tall ribbon.

After experimenting and reading up I managed to get what I wanted by wrapping each button with a RibbonControlGroup, explicitly setting ItemVariantBehaviour to AlwaysSmall but also had to set MaxHeight to prevent a tall ribbon.

Posted 7 hours ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Miles,

Keep in mind that the Classic layout mode for Ribbon is intended to always be three rows tall.  All its layout mechanisms are geared for that.  If you add four buttons to a RibbonControlGroup, they should be stacking the first three in a column, and the fourth will wrap to a second column.

Whereas Simplified layout mode for Ribbon is intended to always be one row tall.

By a "tall ribbon", are you saying that you're trying to limit the height of the Ribbon in Classic layout mode to less than three rows?  That is not an officially supported scenario and we would not recommend that if it's what you're doing, as it could introduce other layout issues.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.