'RibbonButtonIsPressedBorderBrushKey' member is not valid because it does not have a qualifying type name

Dec 2, 2009 at 2:06 PM

Hi all,

I am trying to creating a custom Ribbon control (a RibbonRepeatButton), with a template based upon the standard RibbonButton's template.

The new control generally works, except that I have had to remove a lot of the Triggers from the control template, meaning that the button does not change as required (i.e. in the same way as a RibbonButton) when pressed or hovered over.

I had to remove the triggers due to several lines such as the following:

<Setter Value="{DynamicResource {x:Static RibbonButtonIsPressedBackgroundBrushKey}}" Property="Background" />
<Setter Value="{DynamicResource {x:Static RibbonButtonIsPressedBorderBrushKey}}" Property="BorderBrush" />
<Setter Value="{DynamicResource {x:Static RibbonButtonIsPressedInnerBorderBrushKey}}" TargetName="innerBorder" Property="BorderBrush" />

Because when attemping to build I get errors like this:

'RibbonButtonIsPressedBackgroundBrushKey' member is not valid because it does not have a qualifying type name.

Any ideas how to resolve this issue? Thanks in advance.

Dec 2, 2009 at 2:53 PM

Crisis over, found them. Although if anybody knows a better way of using them than copy-pasting them from the themes/generic.baml file...