summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WP8/PageRenderer.cs
blob: 6ba89ab5dbd80bd3bf258857644f48fd72552637 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
´╗┐using System.Windows.Controls;

namespace Xamarin.Forms.Platform.WinPhone
{
	public class PageRenderer : VisualElementRenderer<Page, Panel>
	{
		protected override void OnElementChanged(ElementChangedEventArgs<Page> e)
		{
			// Set prior to calling base
			Tracker = new BackgroundTracker<Panel>(BackgroundProperty) { Model = Element, Element = this };

			base.OnElementChanged(e);

			Loaded += (sender, args) => Element.SendAppearing();
			Unloaded += (sender, args) => Element.SendDisappearing();
		}
	}
}