Ribbon Button/BackstageItem/Medium

Ribbon for WPF Forum

Posted 12 years ago by Kasper
Version: 12.1.0562
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Avatar

Hi guys,

I would like to use a Ribbon button on my Backstage in the Medium size. If I have a Large button like this:

<ribbon:Button Label="Test" Context="BackstageItem" VariantSize="Large" />

It's shown as a large button with a constant border around it, which is what I want. I would like to be able to do the same with the Medium size button, but if I change the above code from Large to Medium, it looks more like a regular button on the Ribbon and not like the BackstageItem style with the constant border. I have seen that Microsoft uses Medium sized buttons on their Backstage, e.g. in the Outlook -> Print tab, where the "Print Options" button looks like this. Is this currently possible somehow? Otherwise I would like to request that it's added :)

Comments (4)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Kasper,

All that context does is effectively set these:

<Setter Property="Background" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageButtonBackgroundNormalBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageButtonBorderNormalBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabControlForegroundNormalBrushKey}}" />

You could set those as well on your smaller button to get the same look.


Actipro Software Support

Posted 12 years ago by Kasper
Avatar

Okay thanks. I thought it might make sense to make it work for everyone, but this is cool for me as well :)

Unfortunately it doesn't quite seem to do the trick. The background looks right, but there is no border around the button until I hover over it. I even tried setting BorderThickness to 1, but that doesn't seem to make a difference. Is there something else I need to do to make it work?

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hmm, it looks like the default template for smaller buttons won't show the border until you hover over it.  Anothing thing that may work is to use a normal Button and then set its Style to "{StaticResource {x:Static themes:SharedResourceKeys.ToolBarEmbeddedButtonBaseStyleKey}".  Then set those properties above as well.


Actipro Software Support

Posted 12 years ago by Kasper
Avatar

That works. Thank you :)

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.