This is a migrated thread and some comments may be shown as answers.

GridView nd FontAwesome

2 Answers 129 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marko
Top achievements
Rank 1
Marko asked on 10 Aug 2016, 08:59 AM

Hi!

I must use FontAwesome in Telerik GridView for WPF - does anyone know how to do it?

FontAwesome: http://fontawesome.io/

 

Beste regards to all!

m@rko

2 Answers, 1 is accepted

Sort by
0
Marko
Top achievements
Rank 1
answered on 10 Aug 2016, 01:04 PM

More info - using FontAwesome.WPF. Displaying in a regular grid works ok.

I tried this, but the column is empty at run-time

                    <telerik:GridViewDataColumn>
                        <telerik:GridViewDataColumn.CellEditTemplate>
                            <DataTemplate>
                                <fa:FontAwesome Icon="Train" FontSize="48" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                            </DataTemplate>
                        </telerik:GridViewDataColumn.CellEditTemplate>
                    </telerik:GridViewDataColumn>

0
Stefan Nenchev
Telerik team
answered on 12 Aug 2016, 10:01 AM
Hello Marko,

Please, check the following post where the same topic is discussed - Custom Fonts in WPF applications.

In the approach you have provided you are setting only the CellEditTemplate, which is applied when the cell is in edit mode. You can try setting the GridViewDataColumn.CellTemplate instead. Furthermore, it seems like you are trying to directly set a font in a DataTemplate. Instead, you need to apply the font to a certain element like TextBlock, as shown in the provided article.

Regards,
Stefan Nenchev
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
Marko
Top achievements
Rank 1
Answers by
Marko
Top achievements
Rank 1
Stefan Nenchev
Telerik team
Share this question
or