uno icon indicating copy to clipboard operation
uno copied to clipboard

ItemsRepeater flicker

Open dr1rrb opened this issue 1 year ago • 2 comments

Current behavior

No response

Expected behavior

No response

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

No response

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

dr1rrb avatar May 17 '24 22:05 dr1rrb

@dr1rrb Is this about ItemsRepeaterManyItems sample? Are you testing Gtk or WPF?

For Gtk, it's a known problem which I tried to fix, but the fix broke Gallery canary so it was reverted. See https://github.com/unoplatform/uno/pull/15811

Youssef1313 avatar May 18 '24 04:05 Youssef1313

I can try another fix though

Youssef1313 avatar May 18 '24 04:05 Youssef1313

@dr1rrb Is this about ItemsRepeaterManyItems sample? Are you testing Gtk or WPF?

For Gtk, it's a known problem which I tried to fix, but the fix broke Gallery canary so it was reverted. See #15811

Eh eh no it was only to have an issue to track my time ... but since I now found the root cause I can rename it and add details :)

dr1rrb avatar May 23 '24 18:05 dr1rrb

This needs a more detailed information. I tried this but no flickering happened:

// in sample constructor:
ir.DataContext = Enumerable.Range(0, 1000).Select(i => new VM(i.ToString(), i % 2 == 0)).ToList();


public class VM
{
    private string value;
    private bool isVisible;

    public VM(string value, bool isVisible)
    {
        this.value = value;
        this.isVisible = isVisible;
    }
    public string Value => value;
    public bool IsVisible => isVisible;
}
<ScrollViewer Height="400">
      <ItemsRepeater x:Name="ir" ItemsSource="{Binding}">
        <ItemsRepeater.ItemTemplate>
          <DataTemplate>
            <Border Visibility="{Binding IsVisible}">
              <TextBlock Text="{Binding Value}" />
            </Border>
          </DataTemplate>
        </ItemsRepeater.ItemTemplate>
      </ItemsRepeater>
    </ScrollViewer>

However, there is some extreme corruption happening. Reported in https://github.com/unoplatform/uno/issues/16992

ramezgerges avatar Jun 04 '24 10:06 ramezgerges

However, there is some extreme corruption happening. Reported in #16992

That's what I call "flicker" since it's when you scroll (depending of the scroll direction you will be able to see some items or not). Closing https://github.com/unoplatform/uno/issues/16992 as duplicate of this.

Edit: Feel free to rename this issue if you find it not descriptive enough ;)

dr1rrb avatar Jun 06 '24 12:06 dr1rrb