xamarin/Xamarin.Forms

[Bug] Shell UWP ContentPage SizeChanged called only once

Ouverte

#8 501 ouverte le 14 nov. 2019

 (2 commentaires) (2 réactions) (0 personne assignée)C# (1 926 forks)batch import
e/4 :clock4:help wantedinactivep/UWPt/bug :bug:up-for-grabs

Métriques du dépôt

Stars
 (5 644 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Description

If you have a ContentPage, add the event SizeChanged, on iOS its called when the size is changed but it is only called once with UWP, resize the page and it is not called again.

Steps to Reproduce

  1. Xamarin.Forms 4.3 with Shell on UWP. Using the simple created project from the iOS/Android add in the UWP project.

  2. in the views folder of your project change the items page to be like the following

  3. public ItemsPage() { InitializeComponent();

         BindingContext = viewModel = new ItemsViewModel();
    
         **SizeChanged += ItemsPage_SizeChanged;**
     }
    
     **private void ItemsPage_SizeChanged(object sender, EventArgs e)
     {
         Debug.WriteLine("SizeChanged Called");
     }**
    
  4. Run the project in UWP mode, in the output window you should see the SizeChanged called message, when you resize the UWP screen you should see it again and again.

Expected Behavior

The event SizeChanged should be called when the window is resized

Actual Behavior

UWP - it is not being called after the initial call

Guide contributeur