SfChip.ImageSource binding to FontImageSource causes app hang on MacCatalyst

Hi,

I’m attempting to bind a FontImageSource to the ImageSource property of an SfChip via a model class. However, when using data binding for the Glyph, FontFamily, etc., my app becomes unresponsive and hangs (tested on MacCatalyst using .NET MAUI).

After extensive troubleshooting, I confirmed that:

  • Using a static FontImageSource directly in XAML works.

  • Binding the same FontGlyph to a Label inside the same template works.

  • But binding FontImageSource dynamically to SfChip.ImageSource causes a hang.


Here’s the model class I’m binding to:


public class DeviceSortOrderItem
{
    public DeviceSortOption SortOrder { get; set; }
    public string DisplayName { get; set; } = string.Empty;


    // Bound to FontImageSource
    public string FontGlyph { get; set; } = "\ue5db";
    public string FontFamily { get; set; } = "MaterialIcons";
    public double FontSize { get; set; } = 16;
    public Color FontColor { get; set; } = Colors.Black;
}

And here’s the relevant XAML:

<chip:SfChip Text="{Binding DisplayName}" ShowIcon="True">
    <chip:SfChip.ImageSource>
        <FontImageSource Glyph="{Binding FontGlyph}"
                         FontFamily="{Binding FontFamily}"
                         Size="{Binding FontSize}"
                         Color="{Binding FontColor}" />
    </chip:SfChip.ImageSource>
</chip:SfChip>

As a workaround, I’m using DataTrigger to swap in static icons based on logic — which does work.

Is this a known issue, or is there a recommended way to safely bind FontImageSource inside SfChipGroup.ItemTemplate?

Thanks in advance!

Best regards,

Sindre


1 Reply

MD Manju Dhanasekaran Syncfusion Team July 16, 2025 11:18 AM UTC

Hi Sindre Vadla Ravnaa,

We have reviewed your query and we were able to reproduce the reported issue "SfChip.ImageSource binding to FontImageSource causes app hang on MacCatalyst". To achieve the same behavior, we recommend defining the FontImageSource in a model class and binding it to the SfChip ImageSource property. This allows the glyph property to bind without any issues. Below is a code snippet that demonstrates this approach.

Code Snippet :

Model class

public class DeviceSortOrderItem

{

   public DeviceSortOption SortOrder { get; set; }

   public string DisplayName { get; set; } = string.Empty;

 

 

   // Bound to FontImageSource

   public string FontGlyph { get; set; } = "\ue5db";

   public string FontFamily { get; set; } = "MaterialIcons";

   public double FontSize { get; set; } = 16;

   public Color FontColor { get; set; } = Colors.Black;

 

  public ImageSource FontImageSource => new FontImageSource

  {

           Glyph = FontGlyph,

           FontFamily = FontFamily,

           Size = FontSize,

           Color = FontColor

  };

 

}

 

XAML code

<chip:SfChip Text="{Binding DisplayName}" ShowIcon="True" ImageSource="{Binding FontImageSource}">

</chip:SfChip>

 

Regards,

Manju D



Loader.
Up arrow icon