Closed furesoft closed 8 years ago
Ah, i see. Nice idea.
Some thoughts on this. The parser would
The generated inline for the textblock could be equivalent to this XAML
<TextBlock FontFamily="<some other font>">
<Run Text="[" FontFamily="/FontAwesome.Sharp;component/fonts/#FontAwesome"/>
<Run Text=": is a cryptocurrency. "/>
<Run Text="" FontFamily="/FontAwesome.Sharp;component/fonts/#FontAwesome"/>
<Run Text=": is a fiat money"/>
</TextBlock>
Is that kind of what you had in mind?
Usage could be like this
<fa:.....TextBlock Text=":btc: is a cryptocurrency. :EURO: is a fiat money" />
This would allow binding a text which includes icon-tags. Nice.
I would suggest to get close to the standard c# string interpolation syntax for icon-tags like this
<fa:.....TextBlock Text="{fa:btc}: is a cryptocurrency. {fa-euro}: is a fiat money" />
I'm not sure yet if subclassing a text block would be a good fit. Maybe an attached behavior would suit better.
Here is an example where we used an attached behavior to format highlighted search results from elasticsearch back into a textblock
@furesoft Right now, i have no time for this. Feel free to contribute and do a pull request.
hi, pls add a string parser to add icons to textblock, rtb, etc like this:
:btc: is a cryptocurrency. :EURO: is a fiat money