AppDemo4.MainPage.OnAppearing C# (CSharp) Method

OnAppearing() protected method

protected OnAppearing ( ) : void
return void
        protected override void OnAppearing()
        {
            base.OnAppearing();

            // Scenario 0 (Bad, Really) - Inflate and add to VT in OnAppearing
            // At OnAppearing-Time the MainPage VT has been created.
            // Therefore, after the Content has been set, any consequential change on its child nodes, will invalidate the layout multiple times.

            //ID                        | Call Count
            //InvalidateMeasureInternal | 34      
            //UpdateChildrenLayout      | 1         
            //InflateAndAddToVtAppearingBad();

            //ID                        | Call Count
            //InvalidateMeasureInternal | 20       
            //UpdateChildrenLayout      | 1         
            //InflateAndAddToVtAppearingGood();
        }