xamarin/Xamarin.Forms

[Bug] Shell UWP ContentPage SizeChanged called only once

开放

#8,501 创建于 2019年11月14日

 (2 条评论) (2 个反应) (0 位负责人)C# (1,926 个派生)batch import
e/4 :clock4:help wantedinactivep/UWPt/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南