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.98k stars 730 forks source link

`TwoPaneView` does not match WinUI #2816

Open ibebbs opened 4 years ago

ibebbs commented 4 years ago

The Uno implementation of the TwoPaneView doesn't match the behaviour of the WinUI implementation.

Current behavior

Issue 1: When in Wide or Tall mode on a single screen, the Uno TwoPaneView will display scrollbars in each pane if the Pane's content is larger than the available space. The WinUI TwoPaneView does not.

Shown here (note the highlighted scrollbar in the Surface Duo emulator): Issue1Example

Issue 2: When in Wide or Tall mode and spanned across multiple screesm the Uno TwoPaneView continues to use proportional sizing of the Panels whereas the WinUI TwoPaneView sizes each panel to each screen.

Shown here: Issue2Example

Expected behavior

Issue 1: The Uno implementation should match the WinUI implementation.

Issue 2: The Uno implementation should match the WinUI implementation.

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

A reproduction of both these issues can be found in my TwoPainView repository here

Environment

You will require both the Surface Duo Emulator and Surface Neo Emulator to reproduce this issue.

Nuget Package:

Affected platform(s):

Visual Studio:

Relevant plugins:

Anything else we need to know?

jeromelaban commented 4 years ago

This is a rather curious issue. The issue does not appear in an older version of the SDK emulator, it could be that the reported values by the OS through the Surface Duo sdk are different.

jeromelaban commented 4 years ago

After investigation, it seems that the Java SDK is not returning the hinge position properly, making this property always return false.

ibebbs commented 4 years ago

Ah, interesting. I rewrote a lot of that code for a custom 'DualPaneView' control I implemented to work around the issue with the TwoPaneView. I remember there being some odd values reported but have got it working correctly now.

ibebbs commented 4 years ago

Quick update: These issues still exist while using the latest packages and Surface Duo SDK (2020.319.1)

jeromelaban commented 4 years ago

That's interesting though, because the code you wrote is working properly. Would you see a difference in your code and the code that is in Uno ?

https://github.com/unoplatform/uno/blob/master/src/Uno.UI.DualScreen/DuoApplicationViewSpanningRect.cs

GitHub
unoplatform/uno
Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported. - unoplatform/uno