xamarin/Xamarin.Forms

[Bug] Shell UWP ContentPage SizeChanged called only once

Open

#8,501 opened on Nov 14, 2019

 (2 comments) (2 reactions) (0 assignees)C# (1,926 forks)batch import
e/4 :clock4:help wantedinactivep/UWPt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 stars)
PR merge metrics
 (No merged PRs in 30d)

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

Contributor guide