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 4 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 (2)

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 3 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.

Add Comment

Please log in to a validated account to post comments.