Fire Page Appearing event
There's not really a great time to do this so I settled on firing it when it's converted to a Ooui element. Fixes #116
This commit is contained in:
		
							parent
							
								
									0a8898e1b2
								
							
						
					
					
						commit
						e65b3a335d
					
				| 
						 | 
					@ -25,6 +25,8 @@ namespace Xamarin.Forms
 | 
				
			||||||
            if (existingRenderer != null)
 | 
					            if (existingRenderer != null)
 | 
				
			||||||
                return existingRenderer.NativeView;
 | 
					                return existingRenderer.NativeView;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            ((IPageController)page).SendAppearing ();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return CreateElement (page);
 | 
					            return CreateElement (page);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,6 +22,7 @@
 | 
				
			||||||
            </StackLayout>
 | 
					            </StackLayout>
 | 
				
			||||||
            <Button Text="Tap to Display Alert"
 | 
					            <Button Text="Tap to Display Alert"
 | 
				
			||||||
                    Clicked="OnButtonClicked" />
 | 
					                    Clicked="OnButtonClicked" />
 | 
				
			||||||
 | 
					            <Label x:Name="status" />
 | 
				
			||||||
        </StackLayout>
 | 
					        </StackLayout>
 | 
				
			||||||
    </ContentPage.Content>
 | 
					    </ContentPage.Content>
 | 
				
			||||||
</ContentPage>
 | 
					</ContentPage>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,6 +14,13 @@ namespace Samples
 | 
				
			||||||
			InitializeComponent ();
 | 
								InitializeComponent ();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        protected override void OnAppearing ()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            base.OnAppearing ();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            status.Text = "Page appeared";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public async void OnButtonClicked(object sender, EventArgs args)
 | 
					        public async void OnButtonClicked(object sender, EventArgs args)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            activity.IsRunning = true;
 | 
					            activity.IsRunning = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue