Reputation: 5670
I want to put a font icon inside a Grid. If I do it with XAML like this
<FontIcon Glyph=""/>
It works fine. But when I try to add the same item dynamically it is not working (instead of icon some wiered symbols coming). Dynamic code as follows
var fic = new FontIcon {Glyph = "" };
Grid.SetColumn(fic, col);
grdSearchResultHeader.Children.Add(fic);
dynamically added Output looks like this
And the Xaml added one looks correct like this
How can I solve this issue?
Upvotes: 0
Views: 129
Reputation: 7727

is the escaped text and can only be used in XAML (or similar XML). In C# you don’t need to escape, you just need to type \uE970
.
Thanks.
Upvotes: 3