summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WP8/PageRenderer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.WP8/PageRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.WP8/PageRenderer.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.WP8/PageRenderer.cs b/Xamarin.Forms.Platform.WP8/PageRenderer.cs
new file mode 100644
index 00000000..6ba89ab5
--- /dev/null
+++ b/Xamarin.Forms.Platform.WP8/PageRenderer.cs
@@ -0,0 +1,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();
+ }
+ }
+} \ No newline at end of file