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
9.06k stars 735 forks source link

[iOS] Pivot's native style displays only a header #4464

Open juliecantin opened 4 years ago

juliecantin commented 4 years ago

Current behavior

The native style for Pivot is displayed incorrectly - only one header is visible.

Expected behavior

The native style for Pivot is displayed correctly - all the headers are visible as well as the content for the selected header.

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

Replace this line in the Uno samples' App.xaml.cs Uno.UI.FeatureConfiguration.Style.UseUWPDefaultStylesOverride[typeof(CommandBar)] = false; with Uno.UI.FeatureConfiguration.Style.UseUWPDefaultStyles = false;

Launch the samples and open the simple Pivot sample.

UWP style: image

Native style: image

Workaround

Environment

Nuget Package:

Nuget Package Version(s): - samples on the master branch with commit 0c1963a5

Affected platform(s):

IDE:

Relevant plugins:

Anything else we need to know?

https://github.com/unoplatform/nventive-private/issues/49

jeromelaban commented 4 years ago

@davidjohnoliver does this issue ring a bell ? Looks like the native styles somehow impact this control (which is not supposed to use any native presenters edit: It has native presenters).

davidjohnoliver commented 4 years ago

@jeromelaban Off the top of my head I'm not sure why it's happening, no.

Xiaoy312 commented 4 years ago

https://github.com/unoplatform/uno/blob/11569ed96872bfda959ef1975af190b477de8674/src%2FUno.UI%2FUI%2FXaml%2FStyle%2FGeneric%2FGeneric.Native.xaml#L375 Grid.Row doesnt work on native controls, so it is taking the full height and blocks the content behind it. The UITabBar needs to be wrapped inside a Border with the Grid.Row instead.

jeromelaban commented 4 years ago

@davidjohnoliver We should probably prevent the addition of known attached properties in these cases ? Grid/Canvas, etc ?

davidjohnoliver commented 4 years ago

@davidjohnoliver We should probably prevent the addition of known attached properties in these cases ? Grid/Canvas, etc ?

Yes, it would probably be best to either fail when applying these properties, or else propagate them to the managed wrapper so they work correctly.

jeromelaban commented 3 years ago

@jcantin-nventive is there a specific project that is impacted by this issue ? (without naming it)

juliecantin commented 3 years ago

@jcantin-nventive is there a specific project that is impacted by this issue ? (without naming it)

yes there is. I will message you further