xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

[Bug] Referencing Xamarin Forms Nuget breaks Tizen CarouselPage renderer #12451

Closed DamianMehers closed 4 years ago

DamianMehers commented 4 years ago

Description

In my app, I have the following Projects:

I share my Forms code across all the platforms. This structure breaks the rendering of the CarouselPage on Tizen.

The CarouselPage does not render properly when the Tizen Project references the Xamarin.Forms Nuget, either directly or indirectly (such as via the MyApp.Forms project above).

Steps to Reproduce

  1. Create a new Tizen Forms wearable project (api version 4)
  2. In your App.xaml.cs replace the main page assignment with MainPage = new NavigationPage(new CarouselPage { Title = "hello", BackgroundColor = Color.Orange });
  3. Run the app - the orange background is displayed
  4. Update the app to reference the standard Xamarin Forms Nuget.
  5. Run the app - the orange background is NOT displayed. Rendering is broken

This is a simple example, but it seems to me that rendering is totally broken in that pages added to the CarouselPage don't display at all.

Expected Behavior

I expect to be able to put my shared Xamarin Forms code in its own project, which references the Xamarin Forms Nuget, and have a separate Tizen-Specific project which references the shared project,

Actual Behavior

Referencing the Xamarin Forms Nuget either directly, or indirectly breaks rendering of the CarouselPage

Basic Information

TestTizenCarouselPage.zip

rookiejava commented 4 years ago

Hi @DamianMehers, thank you for reporting issue. Let me check!

rookiejava commented 4 years ago

When I checked with the test project you attached, I confirmed that the problem was caused by the side effect of #11824. Since this PR has been applied from 4.8.0.1364, it is recommended to use version 4.8.0.1269 or lower until it is modified.

As you can see below, 4.8.0.1269 works well (both mobile and wearable). Thanks.

DamianMehers commented 4 years ago

Great, thanks I'll try it out. Not sure yet if the that CarouselPageRenderer depends on internals, but if not perhaps I can compile and register it in the current version.

rookiejava commented 4 years ago

Will submit a patch soon. 😉