Fluent.Ribbon buttons

1.2k views Asked by At

I'm somewhat new to WPF and .NET in general. I am using the Fluent.Ribbon library to create a ribbon for my application. I am also using the FontAwesome.Wpf library to draw icons on buttons and the like.

I am having trouble getting these to work nicely together, and I think it is due to how Fluent.Ribbon's button works.

If I write:

<Fluent:Button fa:Awesome.Content="Plus"
               TextElement.FontFamily="pack://application:,,,/FontAwesome.WPF;component/#FontAwesome"
               />

I get "nothing" -- a blank button is "drawn." If I change it to using the standard WPF Button control, I get a button in the right place, using the right icon, but the style does not fit in with Fluent.Ribbon.

I want to just draw my font awesome icon in a nicely styled ribbon button. What should I do?

1

There are 1 answers

0
zwicker On

This is a little late but maybe interesting for others.

<Fluent:Button Size="Small" >
  <Fluent:Button.Icon>
    <fa:ImageAwesome Margin="0" Icon="Info" />
  </Fluent:Button.Icon>
</Fluent:Button>

Setting the margin Property is only required when using the Icon in ToolBarItems.