This project is read-only.

Button Content with _ not displaying as expected.


Using the ExpressionDark theme any button with a content of "_Button" is displayed as "_Button" and not as "Button" with an underlined B. If the theme is removed, the button displays as expected. It also happens with RainierOrange and UXMusingsRed so I presume they are all affected.


m1dst wrote Dec 17, 2008 at 2:18 PM

To get it to work I appended RecognizesAccessKey="True" to the ContentPresenter to produce....

<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" RecognizesAccessKey="True" />

smurfiv wrote Mar 8, 2012 at 7:29 PM

Thanks for the [RecognizesAccessKey="True"] tip, but now the disble buttons have a strange shadow, and when disabling, renabling the buttons the shadow text is left with 3 sorts of blurred characters.

wrote Mar 8, 2012 at 7:39 PM

smurfiv wrote Mar 8, 2012 at 7:48 PM

Okay - I solved the disabled button shadow thing.
1- Remove the <TextBlock Panel.ZIndex="1" x:Name="DisabledOverlay.... item from the button grid
2- Remove the <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledOverlay".... block from the <Storyboard x:Key="DisabledOn"> in the button

wrote Mar 27, 2012 at 10:05 PM

wrote Feb 22, 2013 at 1:10 AM