Skip to content

[iOS] SwipeView: SwipeItem.IconImageSource.FontImageSource color value not honored #27377

@EmilienDup

Description

@EmilienDup

Description

When using a SwipeItem with a FontImageSource for icon, the FontImageSource color is not applied on iOS.

On Android, the color is only applied each time the swipe item is revealed. While this behavior isn't perfect, it at least allows for some customization.

iOS

Screen.Recording.2025-01-27.at.14.02.08.mov

Android

Screen.Recording.2025-01-27.at.14.01.43.mov

Steps to Reproduce

  1. Create a maui project from the default template
  2. Add a SwipeView such as
              <SwipeView>
                    <SwipeView.RightItems>
                        <SwipeItem
                            Text="Action"
                            BackgroundColor="Orange">
                            <SwipeItem.IconImageSource>
                                <FontImageSource
                                    FontFamily="{x:Static fonts:FluentUI.FontFamily}"
                                    Glyph="{x:Static fonts:FluentUI.FontFamily}"
                                    Color="Red"/>
                            </SwipeItem.IconImageSource>
                        </SwipeItem>
                    </SwipeView.RightItems>
                    <Label
                        Text="SwipeView"
                        HeightRequest="100"
                        VerticalTextAlignment="Center"/>
                </SwipeView>

Expected behavior: The swipe item icon is Red
Actual behavior: The swipe item icon is using the iOS system blue color

Link to public reproduction project repository

https://github.com/EmilienDup/MauiSwipeViewIcon

Version with bug

9.0.30 SR3

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions