Backstage icons are missing

Ribbon for WPF Forum

Posted 9 years ago by Valéry Sablonnière - Staubli
Version: 16.1.0630
Platform: .NET 4.5
Environment: Windows 7 (64-bit)
Avatar

Hi,

since the version 2016.1.630, the icons in the backstage buttons are missing, you can see this in the Ribbon demo Document Editor.

Comments (5)

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

Hello, do you mean the backstage buttons like Options and Exit Sample on the Backstage.  If so, yes that is true... we updated the template for those to render similar to the latest Office version.

[Modified 9 years ago]


Actipro Software Support

Posted 8 years ago by Adam Reiger
Avatar

So, is there a way to get the icons back into the buttons of the backstage (either small or large)?

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

Hi Adam,

I'm sorry but no, the Image isn't part of the template for that usage scenario any more.  You could make a custom template that has the Image in it and apply that to the buttons.  Here's the template that gets applied right now.  You could put an image next to the TextBlock in a clone of this an reference the updated template for your instances.

<ControlTemplate x:Key="BackstageHeaderButtonTemplate" TargetType="{x:Type ribbonControlsPrimitives:ButtonBase}">
	<Border Background="{TemplateBinding Background}" 
		BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" SnapsToDevicePixels="True">
		<Border x:Name="innerBorder" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
			<shared:PixelSnapper Margin="{TemplateBinding Padding}">
				<TextBlock x:Name="label" FontSize="13" Text="{TemplateBinding Label}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" SnapsToDevicePixels="True" />
			</shared:PixelSnapper>
		</Border>
	</Border>
		
	<ControlTemplate.Triggers>
		<Trigger Property="IsMouseOver" Value="True">
			<Setter Property="Background" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemBackgroundHoverBrushKey}}" />
			<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemBorderHoverBrushKey}}" />
			<Setter TargetName="innerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemInnerBorderHoverBrushKey}}" />
			<Setter TargetName="label" Property="TextElement.Foreground" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemForegroundHoverBrushKey}}" />
		</Trigger>
		<Trigger Property="IsPressed" Value="True">
			<Setter Property="Background" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemBackgroundSelectedBrushKey}}" />
			<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemBorderSelectedBrushKey}}" />
			<Setter TargetName="innerBorder" Property="Background" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemHighlightSelectedBrushKey}}" />
			<Setter TargetName="innerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemInnerBorderSelectedBrushKey}}" />
			<Setter TargetName="label" Property="TextElement.Foreground" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemForegroundSelectedBrushKey}}" />
		</Trigger>
		<Trigger Property="IsKeyboardFocused" Value="True">
			<Setter Property="Background" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemBackgroundSelectedBrushKey}}" />
			<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemBorderSelectedBrushKey}}" />
			<Setter TargetName="innerBorder" Property="Background" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemHighlightSelectedBrushKey}}" />
			<Setter TargetName="innerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemInnerBorderSelectedBrushKey}}" />
			<Setter TargetName="label" Property="TextElement.Foreground" Value="{DynamicResource {x:Static themes:AssetResourceKeys.BackstageTabItemForegroundSelectedBrushKey}}" />
		</Trigger>
		<Trigger Property="IsEnabled" Value="False">
			<Setter TargetName="label" Property="Opacity" Value="0.4"/>
		</Trigger>
	</ControlTemplate.Triggers>
</ControlTemplate>


Actipro Software Support

Posted 8 years ago by Adam Reiger
Avatar

That works. My only concern is for updates to ribbon template that are breaking changes. I couldn't figure out how to extract the template like I normally do through the Document Outline pane. Can you please explain how you got the template so I can document it so the next developer that updates the ribbon will know how to do it.

Thanks.

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

Hi Adam,

Template extraction via external tools is never reliable.  If your company has a WPF Studio suite license, you can download the default styles/templates from your organization account page.  Otherwise, if you have licensed the product individually, you'd have to request the default styles/templates from us for manual download.  You'd only have to refresh it if you need it to look different within your app.


Actipro Software Support

The latest build of this product (v24.1.3) was released 29 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.