FontImage not working in sfChip
I have tried to use this article
How to apply the FontIcon for Syncfusion chip control | .NET MAUI
I wasb;t able find "Segoe MDL2 Assets" so I have used ionicons.
The ionicons work fine when I use ImageButton
<ImageButton Grid.Column="0" Source="{FontImage  , FontFamily=Ionicons, Size=18}"
HorizontalOptions="Center"
VerticalOptions="Start" >
</ImageButton>
but
<chip:SfChip.ImageSource>
<FontImageSource Glyph=""
Size="12"
Color="White"
FontFamily="Ionicons"
>
</FontImageSource>
</chip:SfChip.ImageSource>doesn't work
Hi Praveen D,
Thank you for reaching out to us. We have reviewed your query based on the update you provided. We have drafted a sample based on the provided code snippet, and the FontImage is applied as expected on our end.
Please ensure that the .ttf files for the FontFamily are included in the sample project. For your reference, we have included the output image and the drafted sample. Kindly review the sample and share your feedback. If the issue persists, please make any necessary modifications and share the updated sample with us, along with the platform where you encountered this issue. This will help us provide a more accurate solution.
Please don’t hesitate to contact us if you have any further queries or concerns.
Regards,
Hariharan C.
Attachment: Reference_5c7a6f78.zip
I have tried this on Andriod emulator Pixel
It works fine.
This doesn't work with this on windows
Hi Praveen D,
Thank you for your detailed update. We have reviewed the issue on the Windows platform and are able to reproduce it. We found that the issue occurs only during the initial loading. However, when the color of the FontImageSource is changed, it updates correctly.
As a workaround, we suggest using the ItemTemplate with the ImageSource and label text as needed. Since the ItemTemplate property is not available in the Chip control, you can use the SfChipGroup and customize it according to your needs.
For your reference, we have included the output image and an updated sample using the above mentioned workaround. Kindly review the sample and let us know if these suggestions resolve your query. Please do not hesitate to contact us if you have any further concerns or questions.
Regards,
Hariharan.
Attachment: Reference_61e03e2.zip
- 3 Replies
- 2 Participants
-
PD Praveen D
- Sep 6, 2024 05:23 PM UTC
- Sep 11, 2024 02:11 PM UTC