unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.76k stars 705 forks source link

WTC ImageEx control displays placeholders instead of primary content #3490

Open xperiandri opened 4 years ago

xperiandri commented 4 years ago
<tc:ImageEx
    Grid.RowSpan="2"
    Grid.ColumnSpan="2"
    Width="65"
    Height="65"
    Margin="15"
    HorizontalAlignment="Center"
    VerticalAlignment="Center"
    Background="{StaticResource OffWhiteBrush}"
    CornerRadius="999"
    PlaceholderSource="ms-appx:///Assets/oval.png"
    PlaceholderStretch="UniformToFill"
    Source="{Binding AvatarURL}" />

Current behavior (Android)

Home page  Android Home page scrolled  Android

Expected behavior (UWP)

Home page  UWP Home page scrolled  UWP

How to reproduce it (as minimally and precisely as possible)

I can provide access to a private Azure DevOps repository.

Environment

<PackageReference Include="Uno.Core" Version="2.0.0" />
<PackageReference Include="Uno.UI.Msal" Version="3.0.0-dev.692" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="6.1.0-build.178.gc768b0f669" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.Connectivity" Version="6.1.0-build.178.gc768b0f669" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.DeveloperTools" Version="6.1.0-build.178.gc768b0f669" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.Notifications" Version="6.1.0-build.178.gc768b0f669" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.Services" Version="6.1.0-build.178.gc768b0f669" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI.Animations" Version="6.1.0-build.178.gc768b0f669" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI.Controls" Version="6.1.0-build.178.gc768b0f669" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI.Media" Version="6.1.0-build.178.gc768b0f669" />

Affected platform(s):

Visual Studio:

jeromelaban commented 4 years ago

Thanks for the report!

Note for contributors

This kind of issue is generally related to this issue: https://github.com/unoplatform/uno/issues/857

Adding a conditional xamarin:Content and xamarin:ContentTemplate is generally enough to work around the issue. In this case, it would need to be added to the ImageEx WCT default template.

xperiandri commented 4 years ago

Do you mean that I need to set that feature flag in my code?

xperiandri commented 4 years ago

Or update the templates to use explicit binging?

xperiandri commented 4 years ago

Could you point to the sample XAML?