dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.21k stars 1.75k forks source link

SwipeItemView won't render FontImageSource on first opening #18806

Open dainius-r opened 11 months ago

dainius-r commented 11 months ago

Description

When creating SwipeView with custom SwipeItemView item(s) and adding Image with FontImageSource, font image won't render on first SwipeView interaction opening, when stopping interaction and opening again second time, font image becomes visible and stays visible always.

Tested on MAUI 7.0.96, same issue exists.

Code to reproduce the issue:

<SwipeView Threshold="120">
    <SwipeView.RightItems>
        <SwipeItems Mode="Execute">
            <SwipeItemView BackgroundColor="LightGray">
                <Image Margin="0,0,10,0" HorizontalOptions="End" VerticalOptions="Center">
                    <Image.Source>
                        <FontImageSource Color="Green" Glyph="A" />
                    </Image.Source>
                </Image>
            </SwipeItemView>
        </SwipeItems>
    </SwipeView.RightItems>

    <Grid BackgroundColor="AliceBlue">
        <Label Text="SwipeView Item" />
    </Grid>
</SwipeView>

Steps to Reproduce

  1. Create standard MAUI project
  2. Add to MainPage.xaml sample SwipeView code from description
  3. Run project on Android

Expected outcome: font image is always visible Actual outcome: font image not visible in first opening

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 13 - API 33

Did you find any workaround?

No response

Relevant log output

No response

XamlTest commented 11 months ago

Verified this on Visual Studio Enterprise 17.9.0 Preview 1(8.0.3). Repro on Android 14.0-API34, not repro on iOS 17.0 with below Project: 18806.zip

SwipeView

ghost commented 11 months ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

malsabi commented 3 months ago

Is there a workaround for this issue ?