unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.89k stars 720 forks source link

[iOS]Image is not rendering properly inside ScrollViewer #2618

Open tmyt opened 4 years ago

tmyt commented 4 years ago

Current behavior

Image control is not rendering properly inside ScrollViewer after change ZoomFactor use ScrollViewer.ChangeView().

Expected behavior

Render scaled Image inside ScrollViewer.

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

<Page
    x:Class="UnoApp5.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <ScrollViewer ZoomMode="Enabled" x:Name="scrollViewer">
            <Image Source="https://images.pexels.com/photos/3651611/pexels-photo-3651611.jpeg" ImageOpened="Image_OnImageOpened"/>
        </ScrollViewer>
    </Grid>
</Page>
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace UnoApp5
{
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();
        }

        private void Image_OnImageOpened(object sender, RoutedEventArgs e)
        {
            scrollViewer.ChangeView(0, 0, 0.5f);
        }
    }
}

Environment

Nuget Package:

Package Version(s):

Affected platform(s):

Visual Studio:

Relevant plugins:

Anything else we need to know?

Youssef1313 commented 2 weeks ago

This needs to be re-evaluated after https://github.com/unoplatform/uno/pull/18261/