How to highlight the nature of the ribbonbutton label?

Is it possible to create an underline (underline) ribbon label property in C # to show the access key without using the key hint property.

For example: if it is a save button then the ribbon button label should be like Save with underscore or underline below S.

+3


source to share


1 answer


You can use Underline

in TextBlock

:

<TextBlock Name="textBlockSave">
  <Underline>S</Underline>ave
</TextBlock>

      

or,



textBlockSave.Inlines.Add(new Underline(new Run("S")));
textBlockSave.Inlines.Add(new Run("ave"));

      

Add this text block textBlockSave

as Button

Content.

+1


source







All Articles